Open source code errors in external editor#111805
Conversation
kitbdev
left a comment
There was a problem hiding this comment.
Looks good.
Note that this is only useful for engine developers since you need to compile the engine yourself to get the absolute paths needed, otherwise nothing happens.
|
How did you enable relative paths? |
|
I think that's just a default option for many compilers. It can be explicitly overridden via |
d4ec057 to
12de363
Compare
|
It should be fixed now. |
There was a problem hiding this comment.
On Linux, nothing happens when I click the error here:
@tool
extends Node
func _ready() -> void:
push_error("test")My settings are set this way, it works for GDScript files:
I restarted the editor after changing the external editor settings, but it didn't help. I don't see anything more being printed to stdout/stderr, even with verbose mode.
|
The relative paths are handled correctly, but the regex fails to match them. I don't even know why is it there. Lines 203 to 206 in e4c9950 |
12de363 to
0c61ff1
Compare
|
@Calinou Please test again. |
0c61ff1 to
02a0595
Compare
Calinou
left a comment
There was a problem hiding this comment.
Works great now 🙂 Code looks good to me.
Note that I had to replace if (ignore_project) with if (p_ignore_project) to get it to build locally, so you should do that to fix CI.
02a0595 to
edceae1
Compare
|
Thanks! |
|
I got a bit confused by this feature. I thought it would link to the code inside github at first. Here's what happen: When opening Godot Editor with no dev environment, I clicked the error link, but then it just opened vscode with an empty new file named after the cpp file that gave the error. This could confuse the engine users to think this is a bug. So it might be a good idea to link to github instead by default in the release version. Unless I'm missing something? |
This shouldn't be happening, it's supposed to open the file only if it exists.
I can try that. |
Just for reference, here's a video. link.error.mp4It only happens because I have vscode setup as the external text editor.
That would be awesome. Even though I have Godot source here, I often prefer to go to github to browse the code if I'm just trying to understand something simple. It would be very helpful if it did so when the file is not present, or even with an editor setting toggle. |

Errors in the Output are now clickable, but the errors from engine's source code do not open properly. The path includes
:(line number) so usingshell_open()will always fail.This PR fixes it, but I went a step further, and made the errors automatically opened in external editor if it's configured.
godot.windows.editor.dev.x86_64_pA1wQuwbXd.mp4