-
Notifications
You must be signed in to change notification settings - Fork 25
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
Relative paths #76
Comments
Any help please? Still looking for a solution |
Sorry for late response:
|
Hi, thanks for answering. I'm really new to bash and I'm a bit lost with it. Anyway, the first "." of The thing is that |
You are correct, dot works as well... Which version of bashdb/bash do you have? (I successfully tried on 4.4.0-94 and also build 91 + bash 4.4.19) You could try installing newest bashdb: |
I'm using bash: GNU bash, versión 4.4.19(1)-release (x86_64-pc-linux-gnu) We're using the same or am I wrong? |
Yes, we are using the same - this is interesting ... Are you able to provide some snapshots + exact reproduction steps. Screen record would be ok as well. Can there be some issues with accessing the "sourced" file? |
The steps are:
As I allready said it stops at the first breakpoint placed at a1.sh line 3 (echo hello) but it doesn't at the second a2.sh line 3 (echo world). I suppose that if there were problems accesing the file it wouldn't work with absolute path neither, maybe I'm wrong with that. |
OK, so the reason is now obvious. When setting breakpoint source path when debugging, it does not accept paths with spaces nor slashes "-". I am talking "load" and "break" commands from http://bashdb.sourceforge.net/bashdb.html. Unfortunately wrapping path in " or ' or ` does not seem to help when i change code of extension... Need to investigate more... Please use path without "-" to verify this finding. Just to keep as evidence, the failing call in different flavours:
(https://sourceforge.net/p/bashdb/code/ci/release-4.4-0.94/tree/command/load.sh) (line 30)
|
Issue reported: |
I've changed the path name from "/home/adrian/test-shell" to "/home/adrian/testshell" and still having the same issue, it stops at the first break point but ignores the second. There must be something else. |
Please attach debug console output, when launch.json configuration has : |
This is the console output: (/home/adrian/testshell/a1.sh:3): |
Hmm, this is weird. Bashdb actually stops, and "continue" is sent by debugger:
Can you see callstack when debugger stops and console shows:
|
Yes, I've noticed that bashdb actually stops at the breakpoint and it seems that vs-code sends a "continue" instruction even if I'm running the option "Debug step by step". Here's the callstack output: ->0 in file I'm wondering... could it be an error with using $0 internally? I got these vars at the watch list:
|
I am a bit confused, since continue can only be sent by vscode to extension, there is no other path for that. So it seems that vscode calls the extension's callback containing "continue" by itself, without any user action? Are you using mouse to click the debugger buttons or "F5"/"F10"/"F11" ? |
What is the platform/system and VS code version? I mean everything looks ok from debug session point of view, so we need to look for problem higher in stack... |
SO: Ubuntu 18.04.1 LTS If you need any other info let me know :) |
Some changes that might help (updated): Please test via "install from vsix" option and give feedback: |
Preparing for release, here is test version: |
Sorry for the late reply, I've been on a trip and had no time. The vsix is working like a miracle! Really... really thank you a lot for all your help and patience rogalmic. |
I should thank you for patience :). Anyway, now the changes are released. For spaces to work in script path, bashdb upgrade will be needed, after it's next release (those scripts can also be updated manually with code fixes in /usr/share/bashdb/* ). |
Hi, I'm having an issue with vscode-bash-debug, maybe it's just a matter of misconfiguration but I don't know were to go and I'll appreciate help. Having the following scripts:
The debugger isn't able to debug file2.sh. But changing '. ./file2.sh' to '/absolute/path/file2.sh' works fine.
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "bashdb",
"request": "launch",
"name": "Bash-Debug (hardcoded script name)",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/file1.sh",
"showDebugOutput": true,
"trace": true,
"args": []
}
]
}
The text was updated successfully, but these errors were encountered: