brummett / devel-hdb Goto Github PK
View Code? Open in Web Editor NEWA graphical Perl debugger implemented as a web service
A graphical Perl debugger implemented as a web service
I suppose this border in working around poorly written code but it would be nice if the code window could avoid have a long horizontal scrollbar.
At the very least the window should always start with the view showing column 0 whereas currently it sometimes shows an empty box because it is basically showing column -1 (but for the longest line).
Like the breakpoints tab in ptkdb
Say the user wants to retry a previously failed function call...
We'll need to modify the optree to insert a GOTO+jump-target right before the currently active line.
http://search.cpan.org/~rurban/B-Generate-1.47/lib/B/Generate.pm
Article about B::Utils and B::Generate. Check out GOTO with a label
http://www.perl.com/pub/2002/05/07/optree.html
In the overridden fork(), the parent process should wait until it gets notified about the child. Then return control back to the debugged program
You can't add a variable to the watch window that contains a circular reference. You start getting warnings about deep recursion into Devel::hdb::App::EncodePerlData::encode_perl_data
It also has the same problem when trying to draw the stack frames and one function was passed a self-referential argument.
While the debugger is stopped, or programmatically, allow the user to turn on trace or follow mode
Devel::Peek exposes this info
It would be cool if it supported keybindings (that were similar to the command line keybindings, e.g. '.' takes could jump to the current line. I believe there are JavaScript libraries for doing keybindings like how Gmail, JIRA, etc. have.
Clicking on the add watch expression button over and over should maybe not create multiple new boxes. I can see this going either way. If you kept the current behavior then the new boxes should probably also get close buttons so you can dismiss them.
When execution changes from the trace file, the line reported as the expected next line is the absolute line number. This means if the function starts at a different line number in follow mode, the reported line is meaningless.
It should be corrected to show the line from the offset of the function.
execution did not terminate after the debugger terminated
! perl -d:hdb=a foo.t
Using libraries at /gscuser/nnutter/genome/master/lib/perl/
Debugger pid 1091 listening on http://0.0.0.0:8080/
ok 1 - created TestResult class
not ok 2 - correctly failed to create an instance of $class_name with (something => undef)
# Failed test 'correctly failed to create an instance of $class_name with (something => undef)'
# at foo.t line 21.
1..2
# Looks like you failed 1 test of 2.
Removing remaining resource lock: '/gsc/var/lock/genome/TestResult/0ec3b32302a87e4d2ed444ba9661e572' at /gscuser/nnutter/genome/master/lib/perl/Genome/Sys/Lock.pm line 316.
Debugged program pid 1091 terminated with exit code 1
^CINT/TERM cleanup activated in Genome::Utility::Filesystem
at /gscuser/nnutter/genome/master/lib/perl/Genome/Sys/Lock.pm line 310.
Genome::Sys::Lock::INT_cleanup('INT') called at /usr/lib/perl/5.10/IO/Socket.pm line 236
eval {...} called at /usr/lib/perl/5.10/IO/Socket.pm line 236
IO::Socket::accept('IO::Socket::INET=GLOB(0x3ebf670)') called at /usr/share/perl5/Devel/hdb/Server.pm line 30
Devel::hdb::Server::accept_loop('Devel::hdb::Server=HASH(0x3ebf118)', 'CODE(0x401e2b8)') called at /usr/share/perl5/HTTP/Server/PSGI.pm line 59
HTTP::Server::PSGI::run('Devel::hdb::Server=HASH(0x3ebf118)', 'CODE(0x401e2b8)') called at /usr/share/perl5/Devel/hdb/App.pm line 673
Devel::hdb::App::run('Devel::hdb::App=HASH(0x401e120)') called at /usr/share/perl5/Devel/hdb/DB.pm line 186
DB::DB called at /usr/share/perl5/Devel/hdb/DB.pm line 422
DB::fake::at_exit() called at /usr/share/perl5/Devel/hdb/DB.pm line 416
DB::END() called at foo.t line 0
eval {...} called at foo.t line 0
END failed--call queue aborted.
Both in the watch window, and popup, each nesting makes the print smaller, so after 4 or 5 levels it gets too small to see
It allows you to turn on the debugger during runtime. It has adapters for many other debuggers.
http://search.cpan.org/~jjore/Enbugger-2.013/lib/Enbugger.pod
Instead of immediately trying to inspect the variable, require the pointer to hover in for a second or so. That way when the user sweeps the mouse across the window, it won't generate a bunch of useless requests
Hovering over the key with "$hash{key}" highlights the key, but not the whole expression. But it does show the right value.
Hovering over "@hash{'key1','key2'}" only highlights the key list, and also does not show the right answer.
There should be a perl module to implement the REST API, and change the tests to use it
Hovering over a variable expression that's part of a hash or array doesn't show the expected thing because DB->get_var_at_level only works when given the exact name of a variable. Things like $list[$i] and @hash{'key1',$key2} aren't valid variable names.
Devel::hdb::App::do_getvar() needs to be smarter about parsing the incoming variable name, separating the base variable name (like @list) from the subset (list element(s) and key(s)).
It should work even when the element/key is a variable in scope when the element is selected.
If the current function includes some complex data (say, a hashref), we don't want to actually render it in the location bar fully expanded.
Try just rendering the PerlValue's header here, with a hover action to show the whole thing, like the way the regular perl variable hover works.
Since the big refactor for stack fram drawing
Say the user stepped over a function that returned the wrong answer.
my $answer = do_something();
print "$answer\n";
Let the user put some text into a text entry box and debug it:
[ do_something() ]
When clicking on the add watch expression button the textbox should get focus so you can just start typing instead of having to select the textbox.
If you try to copy some text to the clipboard it registers the 'c' keystroke even though Command (โ) is also pressed down. I have not tested if it has a similar problem with Control.
My Devel::hdb version is 0.09.
Maybe by double-clicking on the value to bring up an edit box
Have the debugger run once in trace mode, where it records all the lines that execute. Then run again where it stops the first time the execution trace is different than the first time.
The way Bootstrap renders DLs takes up way to much space. We want the key and value to be on the same line, if it fits.
It's the w/W key in the command-line debugger
You enter an expression and the debugger will stop if its value changes
It's like step out... It gives control after the return, but before the next statement after the return, and allows the user to change the return value if they want
When the stack list/tabs becomes taller than the window, the scroll bar appears on the right side of the whole current-process-tab (includes the stack list and code pane). The scrollbar should be attached to the list of tabs instead.
If the main process was started with the 'a' option to listen for outside connections, child processes don't; They only listen on localhost.
After collapsing a list or hash in the watch window, it should be greyed out or have some kind of icon to show that it's collapsed
Instead of the current API of Debugger.stackFrameChanged() where the StackManager tells the GUI when stack frame i changes, it should use a model like a list splice(). Then the Debugger GUI can re-use existing code panes when stepping into a function just by adding a new pane on the top
In the right-click menu for line breakpoints: when you click in the text-box to edit it, it immediately loses focus and you can't edit it
If the program runs to completion without any differences, it pops up a window showing no file/line/package, then pops up the "program exited" modal.
Clicking on a line number to set a breakpoint brings up the ajax error alert
For a line like
foo(); bar(); 4
or
if (foo() > bar() )
We'd like the current position to show which part of that line will be the next to execute. It will probably involve inspecting the optree
vars like
The regex in ::DB::get_var_at_level() for perl variables isn't smart enough
Like \n, \r and \t
From CPAN testers:
Can't "last" outside a loop block at t/14-fork.t line 46.
I was debugging some XML related code and was confused for awhile because it was not showing up as XML but it turns out it just isn't escaped so the XML is being "parsed" by the browser or something.
Screenshot: https://www.dropbox.com/s/d3jokt3xycs6qv1/Screen%20Shot%202013-07-05%20at%2011.05.20%20AM.png
Instead of just stringifying it, try out Data::Dump::Streamer, which can decompile a coderef
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.