Unable to fuse DEBUG

Fuse version 0.37.0 (build 12978)
Windows 10

Following statement is not starting debugger

fuse preview . -DDEBUG_V8

Hi!

That doesn’t start a debugger. You need to attach an external debugger, e.g. Visual Studio Code.

I tried following the video.

I don’t get the message that debugger is started at 5858. [video 2:47]
Also I tried “Attach to Process” where it gave following error.

Following is my launch.json file

Also telnet shows port is closed

Am I missing anything?

Are others able to debug after upgrading to 0.37 ?

There seems to be a [known] issue that affects the capability of preview to open up to debugger. You’ll get notified when there are some news on this.

Glad to hear this is a known bug. Was going crazy following along with the video, trying to get Preview to debug.

More problems: since debugging with Preview is apparently broken, I thought I’d try debugging my actual device (Pixel XL).

Following the video, I forward port 5858 using adb. I then ran

uno build --target=android --run -DDEBUG_V8

The app started on my phone, and now appeared to correctly halt at my javascript “debugger” line.

However, back in Visual Studio Code, when I click “Attach”, I get an error:
Cannot connect to runtime process (reason: read ECONNRESET).

I can see it connect in my terminal: after clicking Attach it says “Connection to a debugger agent established” for a brief second, but then the ECONNRESET error appears in VS Code and the terminal goes back to “Waiting for a debugger agent to connect on port 5858…”.

My launch.json file looks like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "attach",
            "name": "Attach",
            "port": 5858,
        },
        {
            "name": "Launch",
            "type": "node",
            "request": "launch",
            "program": "${file}"
        }
    ]
}

Hey robosaurus,

I’m sorry to hear that you’re having trouble getting the debugger to work. It seems that recent versions of Visual Studio Code are incompatible with the Android debugger. There are two things you could try that work for me at least:

  • Use Visual Studio Code 1.9 (January 2017)
  • Build for .NET with Uno (uno build --target=dotnet --run -DDEBUG_V8)

I’ve created another internal issue to look into the problem with debugging on Android with the latest VSC.

Olle Fredriksson wrote:

“Build for .NET with Uno (uno build --target=dotnet --run -DDEBUG_V8)”

I can confirm that debugging works on .NET target using VS Code 1.12.2.

I didn’t even know Fuse could compile to .NET! Thought it was only Android & iOS. Very cool.

Hey again,

The Fuse 1.0.1 pre-release, available at https://www.fusetools.com/downloads/channel/qa, now allows you to pass defines to the preview command again, so it should now work to start Fuse with fuse preview . -DDEBUG_V8. We still haven’t found out why the Android debugging doesn’t work with later versions of VSC, but at least there are workarounds.

Thanks for your report!