Skip to content

[Feature request] Breakpoints synchronization, submodules #3

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

Closed
paulvi opened this issue Apr 9, 2013 · 7 comments
Closed

[Feature request] Breakpoints synchronization, submodules #3

paulvi opened this issue Apr 9, 2013 · 7 comments
Assignees
Milestone

Comments

@paulvi
Copy link
Member

paulvi commented Apr 9, 2013

Asked by tchambard,
moved from Nodeclipse/nodeclipse-blog#1

I’m using Streamline module : https://github.com/Sage/streamlinejs
The goal of this module is to generate code at node startup to manage easily callbacks. The lines numbers stay the sames.

I added *._js in contentTypes Javascript source files and associated Node editor with *._js files.

The debbuging is working perfectly, but I need to toggle breakpoints directly in STANDALONE_V8 files because the breakpoints synchronisation doesn’t work for those files.
When I toggle breakpoint in STANDALONE_V8 files, the breakpoint is added too in original source file, but the opposite doesn’t work.

@paulvi
Copy link
Member Author

paulvi commented Apr 9, 2013

We will not add this in coming 0.3. But this is interesting.
This is somehow related to coffee-script debugging that I long for.

@wrouesnel
Copy link

I'm encountering the same issue - I can toggle breakpoints in app.js in the editor directly and it works. But trying to toggle breakpoints in submodules doesn't work - however if I open them in Standalone V8 (by stepping through the code) it does work.

Seems somewhat related to Standalone V8 not being started with enough parameters to properly match source code files.

@paulvi
Copy link
Member Author

paulvi commented Aug 5, 2013

@wrouesnel Thanks Will for the reopening. It is second time I hear that.

I assume you are using nodeclipse 0.4.0

http://www.nodeclipse.org/#support

Should you report a bug, please include the following:

Eclipse version number (like 4.2.2 or 3.8.0)
Eclipse distribution (e.g. Eclipse for JEE Developers)
A detailed description of the steps necessary to reproduce the problem.
The '.log' file from the directory '.metadata' in your workspace.

When you say submodules, do you mean your project submodules or Node.js ones?
Also if the project happens to be open-source, it would be nice to reference it.

@wrouesnel
Copy link

I'm running Eclipse:

Version: Kepler Release
Build id: 20130614-0229

C/C++ developers distribution (after adding other modules) with nodeclipse 0.4.0.

It's a small personal project at the moment. The basic issue is I have a directory layout like so:

app.js
/server/fileWatcher.js

and obviously other node modules.

I can set breakpoints in app.js and when I hit Debug with a nodeclipse run it'll break on them in the debugger. But, if I set breakpoints in fileWatcher.js, which is invoked like so in app.js:

// Start file watcher
var fileWatcher = require('./server/fileWatcher');
fileWatcher.indexAll();
fileWatcher.fileWatcher();

then none of the breakpoints in fileWatcher will be reached. But! If I step through the code in app.js and step into one of those fileWatcher functions, then I can set breakpoints from the nodeclipse editor and they'll be picked up just fine.

Browsing the Standalone V8 project that gets created by the debugger, it doesn't contain fileWatcher.js when it breaks in app.js initially.

@paulvi
Copy link
Member Author

paulvi commented Aug 5, 2013

The issue accepted.

@ghost ghost assigned paulvi Aug 5, 2013
@tomotaro1065
Copy link
Member

I investigated the cause of this issue. But this issue was hard to fix.

Nodeclipse add breakpoints, which were set in Javascript source files, into .chromium files, when chromedevtools loaded source code from v8 engine.

In this case, after "require" statement is executed in v8, "afterComplie" event is fired. Then chromedevtools request "script" command to v8 and chromedevtools receives scripts from v8. Nodeclipse adds breakpoints in this timing. But v8 is not suspended, so the next statements are executed, before Nodeclipse add breakpoints. The time rag is about 100ms.

So if you set breakpoint next line of "require" statement or add code waiting 100ms after "require" statement, the breakpoints in new loaded scripts will be worked.

paulvi pushed a commit that referenced this issue Sep 24, 2015
@paulvi paulvi modified the milestones: 0.18, 0.7 Sep 24, 2015
@paulvi
Copy link
Member Author

paulvi commented Sep 24, 2015

@tchambard

I am closing

._js will be associate with JS Editor in 1.0,
and Nodeclipse is passing -debug-brk to node to enable debug for small apps already for a year or two.

If there's something left, please open new ticket and reference this #3

@paulvi paulvi closed this as completed Sep 24, 2015
@paulvi paulvi added the node.js label Sep 24, 2015
paulvi pushed a commit that referenced this issue Sep 24, 2015
paulvi pushed a commit to Nodeclipse/www.nodeclipse.org that referenced this issue Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants