8000 GitHub - benvanik/stdi: Sublime Text 2 Debugger Interface
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

benvanik/stdi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stdi - Sublime Text 2 Debugger Interface

A debugger interface for Sublime Text 2, providing an easy way to wire up a variety of debuggers with rich UI. Included is a debugger for v8.

SUUUUPER experimental! Consider this a proof-of-concept!

Setup

Clone this repository into your Packages directory. To find your Packages path, bring up the console with ctrl-` and enter:

print sublime.packages_path()

You'll likely need to restart Sublime Text 2 to get the plugin.

Usage

The debugger requires some settings to function - namely, what you want to debug. I recommend making these settings per-project, however you can make them global defaults as well.

From the Project menu select Edit Project, add or merge the following:

"settings":
{
    "debug_target": "v8://localhost:5858"
}

The provider URI is the target of the debugger. In the future I'll make it more flexible/add more providers/etc.

When launching your node.js app, add --debug=5858 to the command line:

node --debug=5858 my_script.js

Right click in a ST view and select 'Attach Debugger' to start debugging!

More UI/etc is TODO, but for now you can use the Command Palette (ctrl-shift-P) with the prefix Debugger: to access most commands. The following keyboard shortcuts are recognized:

  • F5: launch debugger
  • shift-F5: attach debugger
  • F8: pause/resume target, continue if broken
  • F9: add/remove a breakpoint
  • shift-F9: enable/disable a breakpoint
  • F10: step over next instruction
  • F11: step in to next call
  • shift-F11: step out of current scope

Features

Breakpoints

TODO

Stack Frame Navigation

TODO

Watches

TODO

Expression Evaluation

TODO

Live Updating on Save

AKA 'edit-and-continue'. This pretty much works right now so long as you don't make changes that V8 is unable to handle, such as adding/removing functions, changing scopes, etc. Reporting for failures is TODO.

Debug Targets

JavaScript

TODO: support script mapping so DART/coffeescript?/etc work

V8/node.js

Working!

  • node.js command line: node --debug=5858 script.js
  • Project setting: debug_target: "v8://localhost:5858"

Chrome (WebKit?)

Partially implemented; not yet working.

  • Chrome command line: chrome --remote-debugging-port=9222
  • Project setting: debug_target: "webkit://localhost:9222"

Others

It'd be cool to plug in other runtimes that have remote debuggers. It's easy to add them, so go contribute!

Resources

Contributing

Have a fix or feature? Submit a pull request - I love them!

As this is a Google project, you must first e-sign the Google Contributor License Agreement before I can accept any code. It takes only a second and basically just says you won't sue us or claim copyright of your submitted code.

License

All code except dependencies under third_party/ is licensed under the permissive Apache 2.0 license. Feel free to fork/rip/etc and use as you wish!

Credits

Code by Ben Vanik. See AUTHORS for additional contributors.

About

Sublime Text 2 Debugger Interface

Resources

License

Unknown, Apache-2.0 licenses found

Licenses found

Unknown
LICENSE
Apache-2.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0