VSC plugin Gauge version 0.0.21 - debugger does not work
sebor255 opened this issue · comments
Description
The newest version of VSC's plugin Gauge does not work when debugging.
When a user wants to start debugging and presses "Debug" over the scenario the error appears:
"Failed to start debugger: The debugger does not work for a stand alone file. Please open the folder C:\MyNewProject"
Tested with various configurations of getgauge python package and gauge versions. The behaviour is the same.
Works fine with VSC's Gauge plugin 0.0.20.
Action
Run debugger from the specification.
Versions
Python 3.6.8
Gauge version: 1.4.1
Commit Hash: a82478a
Plugins
html-report (4.1.2)
json-report (0.3.6)
python (0.3.10)
screenshot (0.1.0)
spectacle (0.1.4)
xml-report (0.2.3)
Gauge output
Python: 3.6.8
Runner Ready for Debugging
Error: Tests failed.
Operating System information
Windows 10 x64
IDE information
VSC 1.60.0
Hi,
I have the same issue, which I had reported on Stack overflow here: https://stackoverflow.com/questions/69104671/unable-to-start-the-vscode-debugger-with-the-gauge-framework
I've also enabled the debug files and I've got the outputs here:
lsp.log
gauge.log
My machine is also a Windows 10 Professional OS x64.
I was able to revert to version 0.0.20. And it worked there.
Here are the log files that I've generated:
lsp_0.0.20.log
gauge_0.0.20.log
Here the log files I also generated again in v0.0.21. This is the version that has the issue.
gauge_0.0.21.log
lsp_0.0.21.log
To rule out any version issues with python or the python vs code plugin can you try using python version 3.9.7 and python vscode plugin version v2021.9.1191016588?
Test 1:
- Python version 3.9.7
- Python for VSCode extension (ms-python.python) v2021.9.1191016588.
- Gauge plugin for VSCode v0.0.21
I was ABLE to reproduce the error.
Test 2:
- Python version 3.9.7
- Python for VSCode extension (ms-python.python) v2021.9.1191016588.
- Gauge plugin for VSCode v0.0.20
I was UNABLE to reproduce the error: Debugger was able to work successfully.
Log files are here
lsp_test2.log
gauge_test2.log
#700 is the change that was included in gauge-vscode 0.0.21, and it intended to add 'Debug' and `Run' options in the explorer tree. I will investigate if this could be a cause, but from my testing so far this hasn't been the case.
It appears to be due to this change... sorry for inconvenience.
Edit: I opened PR #737 to fix this. ALL Windows users cannot start debug in 0.0.21.
This error occurs when the spec file to be executed is not contained in the workspace folder, but as far as I see @vjacobjo's log, the spec is executed from the same folder.
It may have lost its compatibility with windows file paths in some conditions. Though I'm not sure if it relates to this case, I found the line below from the lsp log;
[Gauge] [DEBUG] jsonrpc2: --> request #4: textDocument/codeLens: {"textDocument":{"uri":"file:///c%!!(MISSING)A(MISSING)/Projects/GaugeFramework/ias_net_automation/specs/testData.spec"}}
This should now be fixed in https://github.com/getgauge/gauge-vscode/releases/tag/v0.0.22
Thanks @at6ue!
I can confirm that this issue has been fixed in v0.0.22. Thank you so much everyone :)