简体   繁体   English

我如何设置 VScode 以便我可以单击调试输出中的文件行

[英]How do i set up VScode so i can click on file line in debug outputs

I previously had my VSCode set up for my python project so when a test failed, I could click on a line in the trace debug output and the file would automatically open in my editor window at the given line.我以前为我的 python 项目设置了 VSCode,因此当测试失败时,我可以单击跟踪调试输出中的一行,该文件将在我的编辑器窗口中的给定行中自动打开。 However that is no longer happening for me.然而,这不再发生在我身上。

Does anyone know what factors affect this feature's configuration?有谁知道哪些因素会影响此功能的配置?

My environment:我的环境:

  • Windows 10视窗 10
  • Terminal type: Powershell终端类型:Powershell
  • Programming language: Python编程语言:Python

Example:例子:

======================================================================
ERROR: test_single_email_sending (common.tests.email_Tests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\git repos\lang\common\tests.py", line 240, in test_single_email_sending
    from_addr=from_addr,
  File "D:\git repos\lang\common\email.py", line 29, in send_single_email
    for attc in attachment_file_objs:
TypeError: 'NoneType' object is not iterable

----------------------------------------------------------------------
Ran 1 test in 0.008s

I use the unittest to click " Debug Test " and get the following in the " Python Test Log " of " OUTPUT ".我使用单元Debug Test单击“ Debug Test ”并在“ OUTPUT ”的“ Python Test Log ”中得到以下内容。 When I click "Ctrl" and click "d:...\\pythonVScode\\test05\\a\\b\\ test_unittest.py", the edit bar automatically jumps to the error line "w3":当我单击“Ctrl”并单击“d:...\\pythonVScode\\test05\\a\\b\\test_unittest.py”时,编辑栏自动跳转到错误行“w3”:

在此处输入图片说明

If this is not what you want, please describe in detail and let me know.如果这不是您想要的,请详细描述并告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM