Skip to content
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

Watch Variables can't be resolved after a Debugging Restart and Debugger does not start #26

Closed
daniel-brosche opened this issue Feb 22, 2017 · 5 comments
Labels

Comments

@daniel-brosche
Copy link

Hallo,

I have noticed that when I add a Variable to the Watch Window the Debugger is not able to resolve this Variable when I restart the Debugger and the Debugging will not be started.

My concrete use case:
1.) Start Debugger
2.) Add Variable to Watch Window -> no problem, variable value will be resolved
3.) continue debugging (some steps)
4.) restart the debugger -> debugger can't resolve variable and does not start debugging

In the Watch window appears the following error message:

TypeError: Cannot read property 'stdin' of undefined
    at BashDebugSession.evaluateRequest (/home/brosche/.vscode/extensions/rogalmic.bash-debug-0.0.5/out/bashDebug.js:319:29)
    at BashDebugSession.DebugSession.dispatchRequest (/home/brosche/.vscode/extensions/rogalmic.bash-debug-0.0.5/node_modules/vscode-debugadapter/lib/debugSession.js:424:22)
    at BashDebugSession.ProtocolServer._handleData (/home/brosche/.vscode/extensions/rogalmic.bash-debug-0.0.5/node_modules/vscode-debugadapter/lib/protocol.js:104:38)
    at Socket.<anonymous> (/home/brosche/.vscode/extensions/rogalmic.bash-debug-0.0.5/node_modules/vscode-debugadapter/lib/protocol.js:24:60)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:543:20) 
@rogalmic
Copy link
Owner

I was able to reproduce this.

Please try following package to check the fix:
bash-debug-0.0.5.vsix.zip

code --install-extension bash-debug-0.0.5.vsix

@rogalmic rogalmic added the bug label Feb 23, 2017
@daniel-brosche
Copy link
Author

daniel-brosche commented Feb 24, 2017

Hello,

the Bug is bassically gone.
I can now restart the Debugging without any issues.
During my checks I have noticed another problem.
I have added a Variable to the Watch Window which is called DebPath.
The Watch Windows shows the following value:

DebPath = 'declare -- DebPath="/sdcard/20160316_armhf.deb"'

Probably there is a issue in the parsing of the value. For my understanding it should look like:

/sdcard/20160316_armhf.deb

When the value is not defined resp. assigned it looks like:

DebPath = 'DebPath'

It think it would be event better and more consistent when the value is not defined / assigned to show just:

not available

This corresponds to the same value when the Debugging has been stopped.

Best regards, Daniel...

@rogalmic
Copy link
Owner

I am connecting watch and peek features of debug adapter to "examine" command of bashdb. It will return those "declare .." words if watch is "DebPath", not "$DebPath". However, I noticed that the expression name "DebPath" is redundant in response, so I will remove it so that only value is shown in single quotes.

I will need to properly document how watch works, since i do not want to make any workarounds related to the problem at this point...

@daniel-brosche
Copy link
Author

Is this fix already public available in Form of a Release?

@rogalmic
Copy link
Owner

rogalmic commented Feb 27, 2017

v0.0.7 should contain all the fixes I could do for now. It is published to VS Code marketplace...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants