armory3d / armory

3D Engine with Blender Integration
https://armory3d.org
zlib License
3.05k stars 316 forks source link

Document how to get the Kode Studio debugger successful started #1211

Open BlenderViza opened 5 years ago

BlenderViza commented 5 years ago

e.g. how to get this entry as debug target? See second post (user guzzard) in thread Debugging and asset management from Armory3D forum. debug_html5 I only get KROM as target what doesn't work. See my comment in issue #1165. Are there necessary preparations in blender for proper debugging of the Armory3D application to made? Are there necessary preparations in Kode Studio for proper debugging of the Armory3D application to made? How do I get a complete launch.json with correct HTML5 debug target settings?

xqdd commented 5 years ago

An alternative method for debugging is Debugging in javascript:

image image

Then press F5 in blender to run application and press F12(open browser's develop tool, here is chrome's hot key) after the browser is opened, finally press F5 to refresh the browser to trigger debug

image

BlenderViza commented 5 years ago

@XQDD Thanks for taking the time to document this.

Then press F5 to run and press F12 after the browser is opened, finally press F5 to refresh the browser to toggle debug

I've figured out I have to use Ctrl + Shift + I for Opera, then sources and there it hits the breakpoint. :-)

That's not the way it's supposed to be but my first time I can debug something in Armory3D.

I opened another issue git Kode/Kha and it's possible to debug in Kode Studio. I made a second installation of Kha and it works. Something has to be wrong with the integration of Kode Studio into blender Armory3D.

sh-dave commented 5 years ago

I have only experience in older armory version and not 0.6, but check your launch configurations in PROJECT_ROOT/.vscode/launch.json, that should contain 2 sections for html5 and krom. This should give you the option to select either one in the dropdown.

...
        {
            "type": "electron",
            "request": "launch",
            "name": "Kha: HTML5",
            "appDir": "${workspaceFolder}/build/debug-html5",
            "sourceMaps": true,
            "preLaunchTask": "Kha: Build for Debug HTML5"
        },
        {
            "type": "krom",
            "request": "launch",
            "name": "Kha: Krom",
            "preLaunchTask": "Kha: Build for Krom"
        }
...
BlenderViza commented 5 years ago

"type": "electron" => problem The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled. Type of configuration.

"appDir": "${workspaceFolder}/build/debug-html5", => problem Property appDir is not allowed

How can I find out if the debug extension is installed and enabled? I hope that the property appDir is a consequential error only.

The cause of all this problems has to be the control of Kode Studio by Armory3D. Relevant settings are not given.

sh-dave commented 5 years ago

I just downloaded armory0.6 to check and it is indeed not available anymore. Guess you have to wait for lubos to comment on why. But you should be able to open the project in vscode with the kha extensions installed and run it from there.

Didiercode commented 4 years ago

Sure that simple and unique secured way to get Kode Studio and Armory, with pointing on new versions of haxe, kha, syntax highlighting, debug ... operational again after each new reinstall of Armory is necessary ... each time the experience is something long before its "tombe en marche".