You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node Inspector takes too long to list the sources for debugging #413
Here is how to reproduce the problem with the NativeScript CLI:
tns create test
cd test
tns platform add android
tns debug android --start
After executing the above commands from the command prompt, Node Inspector opens in a browser, but shows nothing in the sources tab for debugging. If the user has enough patience to wait a minute or two, the sources tab would eventually fill with the scripts on the device. The problem is that from the user's point of view the debugging experience is broken. In fact most people seeing this behavior would simply decide the debugger is not working at all. The same misbehavior can be observed in AppBuilder as well. When launching the debugger in Visual Studio all breakpoints appear as disabled and if the user interacts with the application they are not hit. After waiting for a while, the breakpoints would be enabled and debugging can proceed as expected, but again the users would just assume the debugger is not working.
After some investigation on our side, it appears that the scriptParsed notifications from Node Inspector are received after a very long delay. There is also an error in the console saying:
Page.getResourceTree failed.
ReferenceError: process is not defined
Please, note that both Chrome Debug Tools and Visual Studio Debugger need to invoke getResourceTree to populate the resources for debug. Evidently, getResourceTree fails for some reason, however both debuggers still manage to populate the scripts, because some scriptParsed notifications are received after some time. However, according to our tests, if getResourceTree is not called, no scriptParsed notifications are received at all.
changed the title [-]Node Inspector takes too long to show sources for debugging[/-][+]Node Inspector takes too long to list the sources for debugging[/+]on Apr 7, 2016
This is an issue with the node-inspector we are using. It's an old version that is the last version that does not contain nodejs specific implementation. The issue is leaking to the Visual Studio Debugger I guess since we are using the same node-inspector backend for the debugging part.
We should be moving away from this old version of node-inspector. In the future the Visual Studio Debugger should be using the Chrome remote debug protocol to debug Android applications. Which the Android runtime will support.
Also note to remind everybody reading this: When saying "Chrome Debug Tools" this is actually the web interface of node-inspector that simulates Chrome Debug Tools.
Activity
[-]Node Inspector takes too long to show sources for debugging[/-][+]Node Inspector takes too long to list the sources for debugging[/+]blagoev commentedon Apr 7, 2016
This is an issue with the node-inspector we are using. It's an old version that is the last version that does not contain nodejs specific implementation. The issue is leaking to the Visual Studio Debugger I guess since we are using the same node-inspector backend for the debugging part.
We should be moving away from this old version of node-inspector. In the future the Visual Studio Debugger should be using the Chrome remote debug protocol to debug Android applications. Which the Android runtime will support.
Also note to remind everybody reading this: When saying "Chrome Debug Tools" this is actually the web interface of node-inspector that simulates Chrome Debug Tools.
Plamen5kov commentedon Jan 13, 2017
Problem is solved with chrome dev tools integration with 2.5.0 release.