getgauge / gauge-vscode

A Visual Studio Code plug-in for Gauge

Home Page:https://gauge.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

The debugger works on the latest version on a Mac. I see that this an error on a windows machine.

Screenshot 2021-09-09 at 13 38 45

Can you check (and share) the Gauge log folders or Visual studio Code's "Output" tab for more information?

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.

image

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.
image

lsp_test1.log
gauge_test1.log

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.
image

Log files are here
lsp_test2.log
gauge_test2.log

commented

I use gauge-java. I have the same problem with this version (gauge-vscode 0.0.21)

debug

#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.

commented

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"}}

I can confirm that this issue has been fixed in v0.0.22. Thank you so much everyone :)