- 
                Notifications
    
You must be signed in to change notification settings  - Fork 348
 
Debugging with Visual Studio Code
        arthursw edited this page Apr 25, 2016 
        ·
        3 revisions
      
    - 
Open the
YourUEProject/Content/Scriptsfolder in the Visual Studio Code Explorer (Ctrl+Shift+E, or first button on the left toolbar) - 
Go to debug view (Ctrl+Shift+D or last button in left toolbar)
 - 
Click on the Configure gear icon on the Debug view top bar, choose your debug environment and VS Code will generate a launch.json file under your workspace's .vscode folder.
 - 
The default settings should be fine. There must be two configurations, the second one is what we need:
{ "name": "Attach", "type": "node", "request": "attach", "port": 5858, "address": "localhost", "restart": false, "sourceMaps": false, "outDir": null, "localRoot": "${workspaceRoot}", "remoteRoot": null } - 
Let your JavascriptContext to be set as debug context (in UE Javascript console) with
Context.SetAsDebugContext() 
- Warning: you should set the correct javascript console.
 - To debug a game:
 - Start your game (Play button)
 - 
Shift + F1 to have access to the mouse, type 
Context.SetAsDebugContext()in the correct javascript console 
- Start your debug session with F5 or the play button.
 
That's all!