Attach not working
lenscas opened this issue · 3 comments
OS/device including version:
Linux Debian/Linux Manjaro
Issue description:
Ok, admittedly, my setup is a bit weird but it shouldn't matter I think? My project lives on another PC then the one I work with. I use vscode's remote-ssh extension to edit the code and to get Godot to work I just mount the other PC through SSH. This does mean that my debugger lives on another pc than the one that runs the game/editor. With that out of the way, here is the issue:
When I try to attach the debugger to Godot then either nothing happens if Godot runs on another PC despite me having set the correct IP address
If I use an SSH tunnel so I can leave the address
field as "localhost" then I get the error: error while processing request 'setBreakpoints' (exception: Object reference not set to an instance of an object)
.
I don't know where to find more detailed logs about this.
About the logs, you can find them in ~/.vscode/extensions/neikeq.godot-csharp-vscode-0.2.1/dist/GodotDebugSession/GodotDebugSession.log
and there may be some more detailed information there. You may want to launch Godot with the --verbose
flag as well.
It'd be great if you can also provide the version information of Godot, VSCode, this extension, dotnet SDK, Mono, and anything else that may seem relevant.
I don't use the remote-ssh extension so if you could also provide more detailed steps on how to reproduce this with a minimal setup that'd be great too.
mono and dotnet on the PC that runs Godot:
mono --version
Mono JIT compiler version 6.12.0 (makepkg/c621c35ffa0 Thu Jun 17 02:48:02 PM -03 2021)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
Suspend: hybrid
GC: sgen (concurrent by default)
dotnet --version
6.0.102
Mono and dotnet of the PC that I connect to
Mono JIT compiler version 6.12.0.122 (tarball Mon Feb 22 17:42:49 UTC 2021)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: yes(610)
Suspend: hybrid
GC: sgen (concurrent by default)
dotnet --version
5.0.202
This project uses F#, but I don't think that that is the issue as I've seen the debugger work before and used it quite a bit before I had to switch to this setup.
Extension version is v0.2.1
vscode is 1.66
MonoDebug is v0.16.2
C# extension is v1.24
Remote - SSH v0.78.0
Ionide-fsharp is v5.12.0
I don't use the remote-ssh extension so if you could also provide more detailed steps on how to reproduce this with a minimal setup that'd be great too.
Step 1: Mount a computer as a drive with a project through ssh. I use spacefm
's "connect to server" feature for this.
Step 2: Open godot and have it open the project using the shared drive.
Step 3: Open vscode, install the "Remote - SSH" extension
Step 4: use this extension to connect to the other PC and open the folder with the project
Step 5: After having the SSH extension install the extensions C#, Godot-csharp-vscode and whatever other extensions are needed have it create the launch.json file.
Step 6: Configure Godot to wait for a debugger to get attached (I gave it 10 seconds)
From there, you can either fill in the IP address of the machine running godot in the address
part for "Attach" and try to use the attach feature This will result in the problem of the extension trying to do "something" but failing to connect without giving an error.
You can also have the pc with the code make an SSH tunnel to the computer running Godot, forwarding the port that Godot's debugger uses. If you then also leave the address
part as "localhost" and try to use the "attach" feature you get the error while processing request 'setBreakpoints' (exception: Object reference not set to an instance of an object)
error.
I'm not sure if I am able to give it a go with everything running on 1 PC as this setup has kind of been forced on me due to a combination of bad laptop hardware and not really being able to use a mouse without ending in pain. (Touchpad is somewhat fine thankfully enough...)
About the logs, you can find them in
~/.vscode/extensions/neikeq.godot-csharp-vscode-0.2.1/dist/GodotDebugSession/GodotDebugSession.log
and there may be some more detailed information there. You may want to launch Godot with the--verbose
flag as well.
I'll check those in a bit. Need to cook dinner first.
the log with just putting the IP address of the PC running godot in the "address" field:
~/.vscode-server/extensions/neikeq.godot-csharp-vscode-0.2.1/dist/GodotDebugSession$ cat GodotDebugSession.log
01:16:00.624926: GodotDebugSession: Starting debug session...
01:16:01.129308: Connecting to Godot Ide Server
01:16:01.133369: Connection open with Godot Ide Server
01:16:01.134070: Accept client...
01:16:01.167412: Connection open with Ide Client
01:16:01.174164: Peer connection started
01:16:01.174603: Sending message: Request | DebugPlay
01:16:01.377304: Received message: DebugPlay
01:16:07.357662: GodotDebugSession: Debug session terminated.
19:42:22.660685: GodotDebugSession: Starting debug session...
19:42:23.691963: Connecting to Godot Ide Server
19:42:23.719613: The connection to the Godot Ide Server was refused
19:43:09.679906: GodotDebugSession: Starting debug session...
19:43:10.736284: GodotDebugSession: Debug session terminated.
12:23:05.715719: GodotDebugSession: Starting debug session...
12:23:06.794837: GodotDebugSession: Debug session terminated.
12:24:06.415175: GodotDebugSession: Starting debug session...
12:24:07.360817: GodotDebugSession: Debug session terminated.
12:32:09.388652: GodotDebugSession: Starting debug session...
12:32:10.406206: GodotDebugSession: Debug session terminated.
12:33:06.878012: GodotDebugSession: Starting debug session...
12:33:07.817330: GodotDebugSession: Debug session terminated.
12:33:10.660012: GodotDebugSession: Starting debug session...
12:33:11.607084: GodotDebugSession: Debug session terminated.
12:43:32.569327: GodotDebugSession: Starting debug session...
12:43:33.523093: GodotDebugSession: Debug session terminated.
12:56:17.682849: GodotDebugSession: Starting debug session...
12:56:18.679621: GodotDebugSession: Debug session terminated.
00:02:01.879481: GodotDebugSession: Starting debug session...
00:02:03.106803: GodotDebugSession: Debug session terminated.
00:02:08.929747: GodotDebugSession: Starting debug session...
00:02:09.890711: GodotDebugSession: Debug session terminated.
When using the SSH tunnel and "localhost" it also just prints the "Starting debug session" and "Debug session terminated"
00:08:57.676496: GodotDebugSession: Starting debug session...
00:08:58.648266: GodotDebugSession: Debug session terminated.
Looking at Godot's side of thing, in both cases it looks like the debugger can't even get a connection going.
ow_focus_steal_pid 11192 --debug-collisions --debug-navigation --position 480,270
Godot Engine v3.4.stable.mono.official.206ba70f4 - https://godotengine.org
OpenGL ES 2.0 Renderer: AMD Radeon Vega 3 Graphics (RAVEN, DRM 3.35.0, 5.4.184-1-MANJARO, LLVM 13.0.1)
OpenGL ES Batching: ON
Mono: Log file is: '/home/lenscas/.local/share/godot/mono/mono_logs/2022-04-10_00.14.01_11334.log'
debugger-agent: Timed out waiting to connect.
Socket error: 104