首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用量规框架启动VSCode调试器

无法使用量规框架启动VSCode调试器
EN

Stack Overflow用户
提问于 2021-09-08 14:09:19
回答 2查看 599关注 0票数 0

软件版本:

  • Python: 3.9.7
  • 量规: 1.4.1
  • 代码: 1.60.0
  • VSCode (getgauge.gauge)的量规插件: v0.0.21
  • Pylance (ms-python.vscode-pylance):v2021.9.0

我有一个基于Python安装的规范框架。我有一个规范文件,并安装了场景。我还在胶水代码中设置了一个断点。当我单击Debug Spec超链接时,会收到一条错误消息,其内容如下:

启动调试器失败:调试器不适用于独立文件。请打开文件夹c:\Projects\IAS_Desktop_Automation\ias_desktop_automation.

误差GIF

请建议我如何使调试器工作。

更新:我也有来自gauge.log的日志文件结果

代码语言:javascript
复制
09-09-2021 11:06:34.700 [Gauge] [DEBUG] Created gauge_screenshots_dir at c:\Projects\GaugeFramework\ias_net_automation\reports\html-report\screenshots
09-09-2021 11:06:34.701 [Gauge] [INFO] Compatible version of plugin python not found. Installing plugin python...
09-09-2021 11:06:34.701 [Gauge] [DEBUG] Gathering metadata for python
09-09-2021 11:06:34.703 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/python?l=python&p=html-report,python,screenshot,xml-report&o=windows&a=amd64
09-09-2021 11:06:35.105 [Gauge] [DEBUG] Plugin python 0.3.17 is already installed.
09-09-2021 11:06:35.106 [Gauge] [DEBUG] Plugin html-report is already installed.
09-09-2021 11:06:35.107 [Gauge] [DEBUG] Plugin screenshot is already installed.
09-09-2021 11:06:35.107 [Gauge] [DEBUG] Parsing started.
09-09-2021 11:06:35.107 [Gauge] [DEBUG] Started concepts parsing.
09-09-2021 11:06:35.144 [Gauge] [DEBUG] 38 concepts parsing completed.
09-09-2021 11:06:35.144 [Gauge] [DEBUG] Started specifications parsing.
09-09-2021 11:06:35.144 [Gauge] [DEBUG] 1 specifications parsing completed.
09-09-2021 11:06:35.144 [Gauge] [DEBUG] Parsing completed.
09-09-2021 11:06:35.504 [Gauge] [DEBUG] Checking updates...
09-09-2021 11:06:35.505 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/html-report?l=python&p=html-report,python,screenshot,xml-report&o=windows&a=amd64
09-09-2021 11:06:35.675 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/python?l=python&p=html-report,python,screenshot,xml-report&o=windows&a=amd64
09-09-2021 11:06:35.696 [python] [INFO] Python: 3.9.7
09-09-2021 11:06:35.696 [python] [DEBUG] Loading step implementations from c:\Projects\GaugeFramework\ias_net_automation\step_impl dirs.
09-09-2021 11:06:35.771 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/screenshot?l=python&p=html-report,python,screenshot,xml-report&o=windows&a=amd64
09-09-2021 11:06:35.978 [Gauge] [DEBUG] Downloading https://downloads.gauge.org/plugin/xml-report?l=python&p=html-report,python,screenshot,xml-report&o=windows&a=amd64
09-09-2021 11:06:41.804 [python] [INFO] Runner Ready for Debugging

下面是来自lsp.log的一篇文章,其中可能有一些更有启发性的信息:

代码语言:javascript
复制
09-09-2021 11:07:16.033 [Gauge] [DEBUG] jsonrpc2: --> request #7: textDocument/codeLens: {"textDocument":{"uri":"file:///c%!!(MISSING)A(MISSING)/Projects/GaugeFramework/ias_net_automation/specs/testData.spec"}}
09-09-2021 11:07:16.033 [Gauge] [DEBUG] jsonrpc2: <-- result #7: textDocument/codeLens: [{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":12}},"command":{"title":"Run Scenario","command":"gauge.execute","arguments":["c:\\Projects\\GaugeFramework\\ias_net_automation\\specs\\testData.spec:3"]}},{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":14}},"command":{"title":"Debug Scenario","command":"gauge.debug","arguments":["c:\\Projects\\GaugeFramework\\ias_net_automation\\specs\\testData.spec:3"]}},{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":8}},"command":{"title":"Run Spec","command":"gauge.execute","arguments":["c:\\Projects\\GaugeFramework\\ias_net_automation\\specs\\testData.spec"]}},{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":10}},"command":{"title":"Debug Spec","command":"gauge.debug","arguments":["c:\\Projects\\GaugeFramework\\ias_net_automation\\specs\\testData.spec"]}}]
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-09-09 20:49:44

这个问题是由最新的量规扩展更新(0.0.21版)提出的。

  1. 将自动更新扩展插件更改为“无”
  2. 将vscode中的量规扩展范围降至0.0.20。

您可以从这里在version选项卡下获得版本20:https://marketplace.visualstudio.com/items?itemName=getgauge.gauge#install-from-source

将下载放在工作区中,而不是在终端中运行以下命令:

代码语言:javascript
复制
code --install-extension getgauge.gauge-0.0.20.vsix
票数 0
EN

Stack Overflow用户

发布于 2021-09-09 20:49:56

我将VSCode的量规插件恢复为v0.0.20,调试器按预期工作。

在这里输入图像描述

github中提出了一个问题,以查看最新版本:https://github.com/getgauge/gauge-vscode/issues/726中的问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69104671

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档