Links to error line in source file are gone

Sorry if this has been asked before but I have been searching for about 20 minutes and can’t find it anywhere.

I used to be able to press Ctrl and click the error in the terminal window to get to the problem line in my source code. This is no longer available.

Windows 10
VSCode 1.44.0 (user setup)
PIO core4.3.2a1
PIO Home 3.1.1

How do I get the links working again?

This error is also reproducable for me, the Terminal error output does not contain clickable source code links.

src\main.cpp: In function 'void setup()':
src\main.cpp:56:3: error: 'wrongline' was not declared in this scope
   wrongline;
   ^

I’m not sure whether it ever was clickable though and whether it used relative or absolute paths in a previous PIO version which let VSCode do a proper link. Maybe @ivankravets can comment on this?

1 Like

I found something in that if I create the project from scratch, i.e. at PIO Home and use all the same source code, the links work. I think when I created the project that was giving me trouble, I created a folder with the source, lib, etc and opened the folder.

Creating the project using PIO may be the “secret”.

@valeros please help.

Strange, but I cannot reproduce the issue. @maxgerhardt @atestani what platform are you using or it isn’t working regardless of platform?

Working for me on Windoze, latest VSCode / PIO stable against an AVR project. The (Ctrl+) clickable bit is the path:line:col section.

image

I gave my platform information in my opening post but here it is again:

Windows 10 Pro
VSCode 1.44.0 (user setup)
PIO core4.3.2a1
PIO Home 3.1.1

In PIO home it shows:

  • Core 4.3.2a1
  • Home 3.1.1

(I did pio upgrade --dev beforehand). VSCode is at

Version: 1.44.0 (system setup)
Commit: 2aae1f26c72891c399f860409176fe435a154b13
Date: 2020-04-07T23:31:18.860Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.17763

and the Extension version is the latest 1.10.0.

I meant hardware platform ststm32, espressif32?

1 Like

I am using Teensy31 (Teensy 3.2) with Arduino framework.

I went back to the problematic project and the issue is still there. I can upload a zip of the entire folder but this forum doesn’t allow it. There is a source error on line 22 which shows up in the terminal but with no link.

You may be able to readily find the problem with this so please let me know how to get the file to you.

Using the platformio.ini

[env:esp8266]
platform = espressif8266
board = d1_mini
framework = arduino 

with latest

espressif8266 ~ Espressif 8266
==============================
Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.

Home: http://platformio.org/platforms/espressif8266
Frameworks: arduino, esp8266-nonos-sdk, esp8266-rtos-sdk, simba
Packages: toolchain-xtensa, framework-arduinoespressif8266, framework-esp8266-rtos-sdk, framework-esp8266-nonos-sdk, framework-simba, tool-esptool, tool-esptoolpy, tool-mkspiffs
Version: 2.4.0

Could you please send me a private message with your project as a zip archive?

Reproducible if project has a whitespace in its name. Looks like an issue with VSCode, so I reported it here.

2 Likes

Extremely good catch. This is indeed also reproducable for me when I use a project which has no spaces, the error links do show up. So this again some path escape error somewhere in VSCode >.<

1 Like

This problem is back in VSCode 1.701

I have been running along with it working and, for no apparent reason, (Ctrl+click) links no longer work but the link is highlighting when Ctrl+hover… Same source code.as when it was working very recently… Ctrl+ Clicking a link to the error line puts the cursor on the character of the first line in the first line in the editor.

I went back to PIO IDE v2.51 (from v2.52)… same problem. When I downgraded from v1.701 VSCode to v1.69, the problem went away. So the previous issue in VSCode has be reintroduced into VSCode v1.7xx. PIO IDE 2.52 works fine.

Could we ask you to file an issue to Issues · microsoft/vscode · GitHub ?

Done…