-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't set breakpoints in code loaded via eval that contains #line directives #34
Comments
As far as I can say this may be fixed with http://search.cpan.org/~hurricup/Devel-Camelcadedb/lib/Devel/Camelcadedb.pod#TEMPLATE_ENGINES_INTEGRATION |
Hi, I have been asked to help support an existing system, and fundamentally changing the source code to make debugging work is not an option. Mattia (@mbarbon) has done great work writing a wrapper which just loads via the apache .conf files, but it doesn't work on our source because of the problem he has reported. Please could someone look at the plugin and see if we can design a proper fix which doesn't require me to change our Perl source? I am very happy to help in any way I can, but although I'm an experienced developer in other languages I'm a newbie to Perl and I can't tackle this directly myself. Thanks |
Doubt it can be fixed on the debugger side. Because we are talking about arbitrary changing of line numbers by the module and compilation of file form unknown source. I can imagine few hacks, but I believe this is not a good way. |
In default case |
I'm trying to develop a new version of ModPerl::Registry as instructed, but I'd appreciate a check on what I'm doing. I have created a new version which subclasses RegistryCooker and overrides convert_script_to_compiled_handler. That contains the following section: ` my $base = File::Basename::basename($self->{FILENAME});
I think I have to modify this as follows, but I'm really not 100% sure: ` my $eval = join '',
Does that look right? Do I also need to add some code to open the connection to the debugger, or can I do this in the same way as before? Please help, |
Devel::Camelcade version 2017.100.3
I can reproduce this issue when using ModPerl::Registry. I do not have a simple test case yet, but hopefully the description below is enough for you to understand the issue.
Some context: ModPerl::Registry compiles and caches CGI scripts under mod_perl for faster execution. For example this script:
is converted to
and loaded via eval STRING.
From my debugging, the issue is that Perl does not call DB::postponed for code loaded via eval STRING, so there is no mapping for the file in %_paths_to_perl_file_id_map, and the breakpoint is silently ignored.
The text was updated successfully, but these errors were encountered: