VS Code Electron Debugger Information?


#1

I’m trying to debug the Electron target in VS Code but I’m running into a few issues.
Is there any information anywhere regarding this?
(Using v7.1.1, Haxe 3.4.7)

source-map-content doesn’t seem to work when targeting Electron. This is probably the biggest issue as it means even the built-in Electron debugger isn’t very useful.

I’ve tried both the node debugger and the chrome debugger, on several ports, but haven’t been able to get it connected yet. Is it launching with the default Electron port, 9222?

Any help would be great.


#2

How do you set up HTML5 debugging for a standard OpenFL HTML5 project with Visual Studio Code? I haven’t tried this before.

I wonder if the Electron app needs any settings in order to configure that it is debuggable?


#3

To get HTML debugging working I just use Lime to build the project then use the ‘chrome’ debug extension to debug it like a normal js project.

To use Lime’s test command to achieve this I think lime would need to pass specific arguments to the target browser (I’m guessing currently it just launches the URL and lets the OS pick the browser).


#4

Ok, I have this partially working now using the Electron debugger for vscode.

I am using Lime to build the project before launch (via preLaunchTask), then the Electron debugger to launch the application.

Unfortunately because the source mapping isn’t working for electron builds (for me), step-through debugging isn’t working. Any help getting source-map-content working for electron builds Joshua?


#5

I’ve found the issue in the Electron templates that was preventing source mapping when targeting electron.
PR: https://github.com/openfl/lime/pull/1255 (already merged, thanks Joshua)