Jump to content

Lua Debugger


Josh
 Share

Recommended Posts

I thought some of the Lua enthusiasts might want to play with this. When you run "Debugger.exe" it will launch "LE3.exe", which will load and run the "test.lua" program. The program will stop on a call to DebugStop() or RuntimeError() and display the entire contents of the program in the debugger. The programs connect on port 1234, so make sure they aren't blocked from communicating.

 

You can modify the lua code and run it again to see the results. It's pretty interesting to see what all the built-in tables for the different lua libraries look like.

luadebugger.rar

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Well, I think it will work.

 

I love Lua because you can use it without installing any third party compilers and SDKs. It would nice to have the tools good enough that it feels like a lightweight version of VS.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I've got it stepping through code now. I had to run the debugger in a separate thread from the GUI script program, so it will continually update and keep the network connection alive. It was kind of difficult, but it seems to work well.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

It's not ready yet. You have to open a file and do things in a certain order, or it will crash. :) Just due to unfinished parts.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Awesome, I can make it step a line of code, step in to the next function call, or step out to when the function returns.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Sorry, I meant the level editor. Assuming lua is working sort of the same as it does now, when you run the game it executes lua scripts. If we could place break points and step through the main lua script and the attached scripts that we can do in LE3 and see that result in the level editor that would be cool.

Link to comment
Share on other sites

I'm planning to make the editor launch an external process. The whole editing a live script session thing doesn't work out very well in rl. It'll still be seamless but I think the needs to be a division between the editor and the live game. Besides, this allows c++ programs and lua programs to be run with the same method, so there isn't a branch in the user experience depending on language.

 

The level editor will have options to run and publish games, with a much better defined workflow.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

The Editor should not load a static map with all assets at once, but from a sqlite database only the models which are in range (visual range + some custom additional range to prevent view popping). If it loads a static sbx, we have the same problem as today: how can we save gamestates without loading the whole map first and then moving/removing what is not there anymore?

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

It appears the BlitzMax multithread GC is badly slowing down the syntax highlighting. I also noticed the debug output update was slow when stepping, but thought it was due to the C++ program retrieving the Lua stack. I'm going to try building a single-threaded version of the script editor and see how different the speed is.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Whoops, that was my fault. The syntax highlighter had some bad code that was updating every line each time a character was pressed. Looks like it will be my first BMX multithreaded app. Nice to make use of that. It was always too slow for any intensive applications.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 2 weeks later...

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...