Kode Studio - Krom debug fails
See original GitHub issueThough this file can be run with no problem via the viewport or standalone play options in Blender, when using Kode’s debug section the game will not run in either target.
When attempting to run the Krom debug section from within Kode. I get the following output in the console. (After the Discovering targets via http://127.0.0.1:14812/json
the game window appears for a split second then disappears.)
Using Kha from C:\Users\USERNAME\Progs\blender\Armory03\armsdk\Kha
Creating Kha project.
Exporting asset 1 of 1 (Material_data.arm).
Exporting asset 1 of 1 (shader_datas.arm).
Exporting asset 1 of 1 (brdf.png).
Exporting asset 1 of 1 (noise8.png).
Exporting asset 1 of 1 (smaa_area.png).
Exporting asset 1 of 1 (smaa_search.png).
Exporting asset 1 of 1 (Scene.arm).
Exporting asset 1 of 1 (mesh_Cube.arm).
Exporting asset 1 of 1 (World_irradiance.arm).
Compiling shader 1 of 1 (blur_edge_pass.frag.glsl).
Compiling shader 1 of 1 (compositor_pass.frag.glsl).
Compiling shader 1 of 1 (compositor_pass.vert.glsl).
Compiling shader 1 of 1 (deferred_indirect.frag.glsl).
Compiling shader 1 of 1 (deferred_indirect.vert.glsl).
Compiling shader 1 of 1 (deferred_light.frag.glsl).
Compiling shader 1 of 1 (deferred_light_quad.frag.glsl).
Compiling shader 1 of 1 (pass.vert.glsl).
Compiling shader 1 of 1 (pass_lamp_volume.vert.glsl).
Compiling shader 1 of 1 (pass_viewray.vert.glsl).
Compiling shader 1 of 1 (smaa_blend_weight.frag.glsl).
Compiling shader 1 of 1 (smaa_blend_weight.vert.glsl).
Compiling shader 1 of 1 (smaa_edge_detect.frag.glsl).
Compiling shader 1 of 1 (smaa_edge_detect.vert.glsl).
Compiling shader 1 of 1 (smaa_neighborhood_blend.frag.glsl).
Compiling shader 1 of 1 (smaa_neighborhood_blend.vert.glsl).
Compiling shader 1 of 1 (ssao_pass.frag.glsl).
Compiling shader 1 of 1 (world_pass.frag.glsl).
Compiling shader 1 of 1 (world_pass.vert.glsl).
Compiling shader 1 of 1 (Material_mesh.frag.glsl).
c:\dev\armory3d\testBug\build\temp\Material_mesh.frag.hlsl(45,72-83): error X3004: undeclared identifier 'gl_FragCoord'
Compiling shader 1 of 1 (Material_mesh.frag.glsl) failed:
Shader compiler error.
Compiling shader 1 of 1 (Material_mesh.vert.glsl).
Compiling shader 1 of 1 (Material_shadowmap.frag.glsl).
Compiling shader 1 of 1 (Material_shadowmap.vert.glsl).
Compiling shader 1 of 8 (painter-colored.frag.glsl).
Compiling shader 2 of 8 (painter-colored.vert.glsl).
Compiling shader 3 of 8 (painter-image.frag.glsl).
Compiling shader 4 of 8 (painter-image.vert.glsl).
Compiling shader 5 of 8 (painter-text.frag.glsl).
Compiling shader 6 of 8 (painter-video.frag.glsl).
Compiling shader 7 of 8 (painter-text.vert.glsl).
Compiling shader 8 of 8 (painter-video.vert.glsl).
Done.
Discovering targets via http://127.0.0.1:14812/json
Invalid JSON from target: (Unexpected token
in JSON at position 149): {"method":"Log.entryAdded","params":{"entry":{"source":"javascript","level":"log","text":"Trace: TypeError: Cannot read property 'bytes' of undefined
at $hxClasses.kha.graphics4.FragmentShader [as __class__] (krom.js:31000:53)
at Function.kha_Shaders.init (krom.js:18488:35)
at Function.kha_SystemImpl.init (krom.js:18906:14)
at Function.kha_System.init (krom.js:18666:17)
at Function.Main.start (krom.js:220:13)
at Function.Main.main (krom.js:179:7)
at krom.js:35111:6","timestamp":0}}}
Error handling message from target: Unexpected token
in JSON at position 149
Websocket closed
Terminated: websocket closed
Terminated: Got disconnect request
Hitting the green arrow with HTML5 debug, Kode reports
Build errors have been detected during preLaunchTask ‘Build for Debug HTML5’.
and the console gives the following output:
Using Kha from C:\Users\USERNAME\Progs\blender\Armory03\armsdk\Kha
Creating Kha project.
Exporting asset 1 of 1 (Material_data.arm).
Exporting asset 1 of 1 (shader_datas.arm).
Exporting asset 1 of 1 (brdf.png).
Exporting asset 1 of 1 (noise8.png).
Exporting asset 1 of 1 (smaa_area.png).
Exporting asset 1 of 1 (smaa_search.png).
Exporting asset 1 of 1 (Scene.arm).
Exporting asset 1 of 1 (mesh_Cube.arm).
Exporting asset 1 of 1 (World_irradiance.arm).
Compiling shader 1 of 1 (blur_edge_pass.frag.glsl).
Compiling shader 1 of 1 (compositor_pass.frag.glsl).
Compiling shader 1 of 1 (compositor_pass.vert.glsl).
Compiling shader 1 of 1 (deferred_indirect.frag.glsl).
Compiling shader 1 of 1 (deferred_indirect.vert.glsl).
Compiling shader 1 of 1 (deferred_light.frag.glsl).
Compiling shader 1 of 1 (deferred_light_quad.frag.glsl).
Compiling shader 1 of 1 (pass.vert.glsl).
Compiling shader 1 of 1 (pass_lamp_volume.vert.glsl).
Compiling shader 1 of 1 (pass_viewray.vert.glsl).
Compiling shader 1 of 1 (smaa_blend_weight.frag.glsl).
Compiling shader 1 of 1 (smaa_blend_weight.vert.glsl).
Compiling shader 1 of 1 (smaa_edge_detect.frag.glsl).
Compiling shader 1 of 1 (smaa_edge_detect.vert.glsl).
Compiling shader 1 of 1 (smaa_neighborhood_blend.frag.glsl).
Compiling shader 1 of 1 (smaa_neighborhood_blend.vert.glsl).
Compiling shader 1 of 1 (ssao_pass.frag.glsl).
Compiling shader 1 of 1 (world_pass.frag.glsl).
Compiling shader 1 of 1 (world_pass.vert.glsl).
Compiling shader 1 of 1 (Material_mesh.frag.glsl).
Compiling shader 1 of 1 (Material_mesh.vert.glsl).
Compiling shader 1 of 1 (Material_shadowmap.frag.glsl).
Compiling shader 1 of 1 (Material_shadowmap.vert.glsl).
Compiling shader 1 of 8 (painter-colored.frag.glsl).
Compiling shader 2 of 8 (painter-colored.vert.glsl).
Compiling shader 3 of 8 (painter-image.frag.glsl).
Compiling shader 4 of 8 (painter-image.vert.glsl).
Compiling shader 5 of 8 (painter-text.frag.glsl).
Compiling shader 6 of 8 (painter-text.vert.glsl).
Compiling shader 7 of 8 (painter-video.frag.glsl).
Compiling shader 8 of 8 (painter-video.vert.glsl).
C:\Users\USERNAME\Progs\blender\Armory03\armsdk\iron\Sources/iron/RenderPath.hx:698: characters 20-32 : kha.Image has no field texture_
C:\Users\USERNAME\Progs\blender\Armory03\armsdk\iron\Sources/iron/data/MaterialData.hx:133: characters 10-24 : kha.Image has no field texture_
C:\Users\USERNAME\Progs\blender\Armory03\armsdk\iron\Sources/iron/RenderPath.hx:205: characters 6-23 : kha.Image has no field texture_
C:\Users\USERNAME\Progs\blender\Armory03\armsdk\Kha\Sources/kha/input/Pen.hx:10: characters 9-26 : Class<kha.SystemImpl> has no field getPen
Done.
And Kode reports the following issues:
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Chrome debugger in Visual Studio Code gets stuck
1 Answer 1 ... The fix was quite easy. For a long time I did not make a restart to my computer. After...
Read more >What's New for Chrome debugging in VS Code
If you aren't familiar with the Microsoft Debugger for Chrome extension, it allows you to debug your client-side JavaScript running in Google ...
Read more >Debug ASP.NET Core Blazor WebAssembly - Microsoft Learn
Learn how to debug Blazor WebAssembly with browser developer tools and an integrated development environment (IDE).
Read more >Solve “Breakpoint ignored” with Visual Studio code (vscode ...
To solve this, either restart the debugger after it has initially loaded (keep Chrome open). Or you could use breakOnLoad: true. More info...
Read more >vscode-chrome-debug/README.md at master - GitHub
Debug your JavaScript code running in Google Chrome from VS Code. ... This extension has been deprecated as Visual Studio Code now has...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I may just have coincidentally stumbled across the solution for this. I just started watching this video (at 2:00 min) from Robert, the main developer of kha. He explains how to configure the settings “kha.khaPath” and “krom.kromPath”. I just pointed them to <yourpath>/Armory/armsdk/Kha and <yourpath>/Armory/armsdk/Krom and now everything works fine.
Does this also work for you?
Linking to https://github.com/armory3d/armory/issues/745.