Jump to content

Debugging Leadwerks with C#


Raz
 Share

Recommended Posts

Hey there!

There's someting interesting I noticed just now. If you try to debug an application made with C# and Leadwerks.Net, no output (Loading File, File not found, etc.) from Leadwerks is shown in the console. However, if you run the application from outside Visual Studio, the output shows in the console.

As this is debug output, I'm wondering if there's a way to get it to show somewhere while debugging as well..

 

Greets,

Philipp

Link to comment
Share on other sites

Currently I have not bee able to ascertain the reason behind this. I believe it relates to the console commands (possible Win32) that are intercepted by Visual Studio; commands are executed from an 'unsafe' non-CLR library.

 

(I could be totally incorrect, just a guess)

 

You have the option to traverse the file generated by the Leadwerks code, as it is appended and write that to the console manually. Although, I wouldn't recommend that.

Link to comment
Share on other sites

There is another solution!

Within the DLL.cs file you need to change this:

 

internal static class Dll
{
	private const string ReleasePath = "engine.dll";
	private const string DebugPath = "engine.debug.dll";
	private const string Path = DebugPath  //CHANGE TO DEBUG //ReleasePath;

 

Only downside is that you will need to recompile the C# project library yourself.

 

I will update the library to allow for process-bound debugging.

Link to comment
Share on other sites

Thanks, man!

As I'm recompiling the DLL myself anyway (need to add a lot of stuff that's been not implemented previously) that's a great addition!

 

[EDIT]

 

Hm, unfortunately that doesn't seem to make any difference except for scene loading being a lot slower. Still no output either in VS or in the console.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...