-
Notifications
You must be signed in to change notification settings - Fork 351
Debugging
Unreal.js implements debuggee feature which allows to be debugged remotely. You can debug live unreal.js code with Visual Studio Code.
First, tag JavascriptContext which you want to debug by calling Context.SetAsDebugContext()
.
Then, launch a remote debug remote session in Visual Studio Code by connecting localhost:5858
.
- Debugging with Visual Studio Code
- Debugging with Visual Studio 2015
- Debugging with Visual Studio 2019
You can also debug your application in UE4Editor. Within JavascriptConsole
you can freely evaluate your global scope variables, so just expose your debuggee variable into global scope like below.
(function (global) {
let actor = new Actor(GWorld)
global.my_debuggee = actor
})(this)
You can inspect my_debuggee
in your JavascriptConsole
, which can be opened with Tools - Developer - JavascriptConsole
.
> my_debuggee.ToString()
< "Actor_1"
Please uncheck Edit - Editor preferences - General - Etc - Use Less CPU when in Background
to keep V8 debugger message pump busy!