GameMonkey Script

GameMonkey Script Forums
It is currently Sun Jan 20, 2019 11:05 pm

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: My GM Remote Debugger
PostPosted: Thu Dec 07, 2006 4:13 am 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
So I've been working on a remote debugger for GM off and on for a while now. It's been through several iterations. First I got pretty far into a C++/CLI implementation using windows forms and .NET, until finding out that the interaction with native code was not working completely. After that I tried to start again using WTL and stopped after realizing how shitty WTL is. Finally I started toying with wxWidgets, which has easily become my GUI development toolkit of choice. It is extremely easy to make applications with, and is cross platform to boot.

So anyways, here's a screen of my debugger in action. Nearly everything is working already, except the globals tab and the watch windows. I may need to extend GM itself for the globals list, as I don't believe it supports by default sending the entire state of the global table.

Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 07, 2006 10:40 am 
Offline

Joined: Thu Jan 01, 2004 4:31 pm
Posts: 307
Sweet - are you planning to release this?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 07, 2006 12:01 pm 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 708
Gave up on .NET? Blashphemy! ;) Seriously, that's looking great DrEvil. I hope you can make it rock stable and re attachable. Yeah, you might need to just dump the entire global table, and even try to execute remote queries to get extra useful information. The debugger interface is a bit lacking.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 07, 2006 1:29 pm 
Offline

Joined: Mon Jun 26, 2006 3:48 pm
Posts: 114
Location: Paris, France
Quote:
Nearly everything is working already


Come on, release it then!
I hope you'll upload a working version soon. Nice work, DrEvil.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 07, 2006 4:47 pm 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
The main reason I dropped the .NET version, or rather the C++/CLI, is because I was running into an issue with it that seemed to defy all logic on what should have been working. I noticed that things weren't working right at first, and as I started to debug it more I discovered that for some reason it wasn't executing the C++ code right, particularly the pack code. I would step into the gmDebuggerSession::Pack functions, and the incrementing of the m_outCursor, but the value would not change from 0.

The other reason for switching is because I wanted to release this back to the GM community, and preferred it to be something with the capability of being cross platform. wxWidgets fit this bill nicely.

I'll probably release it in the next few weeks. I'm thinking I need to add functionality to dump the entire global table to the debugger, and probably another function to get a variable in the current context by name, to support the watch windows. There's a function gmMachineGetVariableInfo, but it takes a variable Id, which I don't know where to get(its not implemented anyways), and probably don't have the id anyways for a watch window. If you'd like after the debugger gets some testing and stuff maybe the new functionality that ends up being added can be put in the official release. Actually, I notice that gmDebuggerContextVariable passes a variable Id, so presumably that is used in the gmMachineGetVariableInfo to get more information about a variable. That for maybe getting the members of a table variable or something or what?

Also, this one works differently than the gmd that comes with GM. IMO gmd was backwards, in that the application had to be run to connect to the debugger. With mine its the other way, and the debugger is the one that does the connecting to the app. Your app can be running happily for days and at any time connect/disconnect the debugger. Greg, was there an issue or something that influenced the way that was set up with gmd ?

Greg, regarding the unimplemented functions gmMachineGetSourceInfo & gmMachineGetVariableInfo, do you remember what they are supposed to do?

I'm also planning on some other helpful stuff, like an input window like you mention for sending script snippets or entire strings to run, I already got print functions sending to the bottom window in the debugger when it's attached. If anyone has other useful ideas let me know as well.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 09, 2006 10:40 am 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 708
DrEvil-OB wrote:
... Greg, was there an issue or something that influenced the way that was set up with gmd ?

Greg, regarding the unimplemented functions gmMachineGetSourceInfo & gmMachineGetVariableInfo, do you remember what they are supposed to do?...

I don't know much about the gmDebugger interface or the gmDebugger. The interface was made by Matt and the example debugger by someone else. Certainly the example connection method is completely wrong. Those gmMachineGetSource/VariableInfo are supposed to be implemented by a debugger to drill into tables etc. They would require some kind of UID (Unique Identifier) system, like a two way hash table between the debugger and game. I don't have more information on that at the moment, but that was their intention.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Dec 20, 2006 1:29 pm 
Offline

Joined: Wed Dec 20, 2006 1:09 pm
Posts: 2
heh, yesterday I saw your .net screenshots on the omni-bot forum. I'm not a super fan of .net programs, of course, I can't be against them either. But now I happen to read you switched.. :) nice move ;)

wxWidgets is indeed a nice library, although I prefer Qt myself. But I can imagine wxWidgets has a much lower entry level than Qt (which can be confusing in the beginning).

While I'm at it, keep up the good work, here at noon at work we really appreciate the omni-bot ;)

greets


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 21, 2006 5:06 am 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
I was interested in Qt at one point until I saw the price tag. Although I will probably open source this particular project I have many other projects I likely won't, so it doesn't make sense to use different toolkits for different projects for their open source license. Fortunately wx is insanely easy and has tons of really nice and helpful stuff, so it's all good. Much better than .NET even IMO. Only thing I'd wish about wxwidgets is more mature software to put together your windows components. wxFormDesigner is about the best I've found so far to visually build the app but it lacks alot of useful shit that others have and they lack shit that it has. Bummer really. Would be nice if more OS projects worked together for a feature rich and nice app as opposed to an army of half-assed ones.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 21, 2006 7:04 pm 
Offline

Joined: Wed Dec 20, 2006 1:09 pm
Posts: 2
eheh, good point :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 18, 2007 5:46 pm 
Offline

Joined: Tue Aug 23, 2005 10:01 am
Posts: 13
I'm looking fwd into this project - keep up the good work! :D


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 28, 2007 9:48 pm 
Offline

Joined: Tue Aug 23, 2005 10:01 am
Posts: 13
<BUMP>

Any news on this, DrEvil? :mrgreen:


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 29, 2007 3:30 am 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
I haven't had time yet to update gme to work with the debugger, but if you want to contact me over IM I can send you the source if you have the time to finish. The only thing left to do before potentially releasing this is to update gme to act as a server instead of a client. Currently in the latest gme, the script side is set up as a client to connect to the debugger which is listening as a server. One of the things I changed was reversing that, so that the script application is the server, allowing you to connect at any time while your app runs. This is the more logical way to work. I had planned on converting gme so that it would be updated to support my debugger and I couple submit the debugger to be released with a GM update. This shouldn't be hard at all, just changing gme to listen rather than connect. If anyone is interested in completing this last part I would appreciate the help.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Apr 07, 2007 2:18 pm 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
Ok I just about have a GME replacement ready. Will check back in soon.


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 10, 2008 6:34 am 
Offline

Joined: Tue Nov 11, 2008 9:03 am
Posts: 20
I already sent a PM to DrEvil-OB recently, but I wanted to post here to raise interest and awareness about this debugger. Even if it's not complete, I'm sure there can be enough of a community effort to get it fixed and running.
We are somehow considering writing a debugger, but it'll be a shame to do so when there is one already running somewhere that we haven't even evaluated yet (I hope what we can use and improve that, and ditch the idea of writing another one).
Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 10, 2008 4:45 pm 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
I very much plan to upload the debugger to the sourceforge repository I recently set up for GM extensions. In order to work the debugger includes some extensions to the gm debugger code, some extra instructions, etc. Sorry it's taking so long but I wanted to ensure it works to the extent that I had it working before prior to uploading it, and double check the dependencies with wx windows, maybe update that to latest wx to make it easier to get compiling. It doesn't help much to upload non working code. I'll try to get this upload this week before I go on 2 week vacation.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group