An advanced debugger for Ren'py: anyone interested?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
herenvardo
Veteran
Posts: 359
Joined: Sat Feb 25, 2006 11:09 am
Location: Sant Cugat del Vallès (Barcelona, Spain)
Contact:

An advanced debugger for Ren'py: anyone interested?

#1 Post by herenvardo »

This idea has been floating on my mind for a while, but now that Trecevidas has asked for a pause on the FoJ project to catch his breath (that's reasonable, since the ammount of work is really heavy for a single artist), I might have some time to pull it forward.

The idea itself would be to tinker around Microsoft's IronPython (a Python implementation upon the CLR, with a surprisingly GPL-compatible license) to build a Ren'py debugger that runs on both .Net and Mono.

Ideally, the final version of this tool would include these features (mostly, what I find as missing on Ren'py's developer menu):
  • Advanced watches: it can be compared to Ren'py's variable viewer, but with several aspects that make it more similar to Visual Studio's "watch" features:
    • Detail view of complex objects, such as sequences and user-defined classes. Currently, the variable viewer doesn't give you any insight into custom objects, and I've found myself creating some global variables when I needed to keep track of certain object attributes a few times, which is clumsy, annoying, and error-prone :?.
    • Variable modification, so you can "try on the fly" what value should a variable have for something to work, and edit the code once you have figured out. Currently, you'd have to edit the code and reload the script to try each value.
    • Pause on change and pause on condition watches. These are quite self-explanatory, and are quite related to the breakpoint and stepping features (see below).
  • Code stepping: "Step into" (into a function/method), "Step out" (from the current function/method), and "Step through" (through the current function/method call) would be in. Sometimes one needs to find out if execution is flowing through the code as expected, in order to figure out what's going wrong.
  • Breakpoints and run to cursor: So if you just want to see the "results" of your (insert some 4-or-more-digits number here) lines of init code, you can simply put a breakpoint at the beginning of the start label, and then watch all the stuff you want to check. The "run to cursor" feature would be a trivial addition, which adds a "temporal" breakpoint at the current cursor position which is removed as soon as the execution pauses for any reason (if the reason wasn't hitting that temporal breakpoint, then you'll probably want to "run to cursor" again, and the temporal breakpoint just removed will be created again :D).
  • Exception and call unwinding: IMHO, debugging an exception with the currently available tools is, simply put, painful: you need to restart the game and reach the "criticall point" again everytime you try some change. Although saving just before that point is often helpful, you don't normally know where the crash is going to happen until... well, it happens, at least once. If it takes ten minutes to reach the criticall point from the beginning (which may be quite reasonable for big, complex projects), then the pain is guaranteed (and if you try to use "Skip mode" to save some time, it may backfire if your reflexes fail and you skip into the exception again). The case of call's is a needed feature to make good use of the exception unwinding tool: if your wrong code causes an exception deep in Ren'py's code (example: inside ui.interact()), then you'll probably want to unwind back to the line of your code that caused Ren'py to crash.
  • Execution flow manipulation: if you have ever drag-and-drop'ed that green arrow in Visual Studio known as "currently executing statement", you'll know what I mean: basically, you can move the "execution point" back and forth through the code, and even "upwards" (in the call stack) when combined with the call unwinding feature.
  • Edit & Continue: Last, but not least, this feature would allow a developer to pause execution (it will probably be already paused due to an exception or "pausing watch"), edit the code (although with some limitations), and continue running the modified version; without needing to start over. Once you start moving the execution point to re-run edited lines and are doing this due to an exception, you get the ability to fix many errors on the fly ;).
I'm probably missing something, but these are definitely the most prominent features I'm aiming for.

If someone is wondering why I'm thinking on doing this rather than asking PyTom to incorporate such support into Ren'py itself, or even hack the engine myself; and/or why I'm doing this on .Net/Mono instead of directly on Python, there are many reasons:
  1. I'd rather let PyTom focus on the general audience's needs, and care myself about my own specific needs ;).
  2. The current design of Ren'py doesn't bend too well to suporting these features: unwinding python exceptions and calls from python code itself can be extremelly hard, if possible at all. Having two separate execution engines (such as the CLR, and IronPython on top of it) provides the ideal environment to have the code running on the "bottom" one (in this case, the CLR code) tinkering with the code and state of the "top" engine (IronPython) on the fly.
  3. Although it should be, in theory, possible to have a python interpreter running from python code on a separate interpreter, which would match the "dual-engine model" described above, my Python skills are simply not enough to implement this on python, so I'll be doing it on the language/platform I'm currently most proficient at: C# upon .Net/Mono.
  4. Since nesting a [ spoiler] inside a [ list] is as ugly as putting a < div> inside a < li>, see spoiler below :P
[EDIT]Edited to clarify some points and prevent some missunderstandings.
First of all: I'm aware that the debugger idea can only raise interest among a small subset of people within this community. One of the goals of this thread was to get an idea of how big or small that subset would be.

The debugger itself is intended to be (the first) part of a bigger project, which I'll probably title "Ren'py Studio" and will be a fully-featured IDE for Ren'py development. The IDE would ideally include several features, most prominently a visual UI function designer, project-management functionalities, code refactoring, a highly Ren'py-specific editor, and some purpose-specific code generators (such as Character and Image wizards).
The main reason to begin with the debugger is that it will be the toughest part; so once it is ready other features will come in steadily.
Finally, I want to mention that the choice of C# upon .Net/Mono is mostly based on the facts that this is my usual working environment, and that it would allow for better features in shorter times (there are many things I simply couldn't do directly on Python).
[/EDIT]

So, the question is: if I manage to pull this forward, how much attention should I expect from this community? More specifically, how many among Ren'py users would be interested in using the finnished product; and/or willing to test the pre-release versions?
(BTW, although I still have to chose a license, the tool would be 100% free, both in terms of freedom and price ;).)

I'm looking forward for anything any of you wants to say about this idea :mrgreen:.
Last edited by herenvardo on Fri Oct 31, 2008 4:31 pm, edited 1 time in total.
I have failed to meet my deadlines so many times I'm not announcing my projects anymore. Whatever I'm working on, it'll be released when it is ready :P

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#2 Post by delta »

I think hardly anyone runs Ren'Py at the level where this would be really needed. Then again, I certainly wouldn't say no to it.

What intrigues me more is that you seem to be writing a second Ren'Py interpreter/runtime. This in turn could lead to some interesting things, like a graphics supersystem that is more optimized.
The rest is left as an exercise for the reader.

Jo'ogn
Veteran
Posts: 398
Joined: Sat Jul 12, 2008 1:31 pm
Projects: Kassiopeia [iVN]
Location: Deutschland
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#3 Post by Jo'ogn »

delta wrote:I think hardly anyone runs Ren'Py at the level where this would be really needed.
That was my first thought, too.

Why not channeling all this energy into expanding the Ren'py documentation, herenvardo?
*makes big cute irresistable kitty eyes* =^.^= ~nya~
Audio Plays: [original] The White Feathers Directive - [Star Wars] Through Flame and Shadow
Ren'Py: Kassiopeia [very interactive VN] work in progress - looking for proof reader english

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#4 Post by jack_norton »

I would definitely use it: I'm trying to (slowly) build my "princess maker game" (Spirited Heart) and I have some troubles understanding how to update things on screen and a better debugger would be cool (sometimes the error aren't reported at the exact line but rather the function called).
Even if probably most of my problems could be solved by lots of examples of the most obscure functions like ui.timer, dynamicdisplayable and such. From my several year in programming I found out that the best way to learn a new language/tool is with source code examples :)
follow me on Image Image Image
computer games

herenvardo
Veteran
Posts: 359
Joined: Sat Feb 25, 2006 11:09 am
Location: Sant Cugat del Vallès (Barcelona, Spain)
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#5 Post by herenvardo »

First of all, thanks for your replies: right now, any kind of feedback on the idea is welcome ;).
delta wrote:I think hardly anyone runs Ren'Py at the level where this would be really needed.
Actually, I do :P. I wouldn't think of this tool as something "really needed", because that depends on what "needed" actually means: after all, we have assemblers and text editors (or even hex-editors with which to directly hack the machine-code into an executable file), so is Ren'py (or, for that matter, any other development tool or engine) needed at all?
Of course, while it is possible to do in assembly or machine code anything that can be done on Ren'py, it's quite obvious that Ren'py saves a lot of work and pain for the task of creating platform-independent VNs and related games. Similarly, while it is possible to debug any Ren'py project with the currently available tools (and even without them), an advanced debugging tool can save lots of work and pain when debugging highly complex projects.
As examples of "highly complex projects" beyond my own that quickly come to my mind, I can think of Aenakume's walkabout engine or chronoluminaire's Tile and Unit engine, which squeeze Ren'py's support for python to the limits in order to provide quite complex capabilities; and would probably benefit, IMO, from a tool like this.
delta wrote:Then again, I certainly wouldn't say no to it.
That makes sense: totally free, and requires nothing on your part, so on the worst case you just gain nothing from it, but lose nothing either :P.
delta wrote:What intrigues me more is that you seem to be writing a second Ren'Py interpreter/runtime.
Not really: the idea is about making Ren'Py run "as is" upon IronPython, tweaking IronPython itself to support debugging, and some of the dependencies (pygame and SDL come to mind, but I can't come up with a full list until I get deeper into this project) for them to work on IronPython (ie: changing the code that draws directly on the screen through the GPU to draw within an WinForms Form instead). Ideally, I'd try to keep Ren'Py itself as untouched as I can, so future versions of the engine can be used without having to tweak the debugger itself.
delta wrote:This in turn could lead to some interesting things, like a graphics supersystem that is more optimized.
As mentioned, I'm not touching anything unless I really have to, and improved graphics optimization is not likely to happen. In general, debugging a program (be it something as "small" as a Ren'py game, or something as huge as an entire OS) has a higher cost, in computer resources, than running it: a debugger has to actually run the program, while the debugger itself is also running, and has to keep track of some additional stuff (such as the correspondence between currently executing code and its location on the sources, or a log of changes made to the program state to enable unwinding).
OTOH, is worth pointing out that Microsoft claims IronPython being up to 1.8x faster than the "standard" CPython implementation; although I still wonder what this "up to" means: it probably means that this improvement only happens on specific test-cases that are ideal for IronPython's own implementation, and the execution may be probably slower on the general case.
Jo'ogn wrote:Why not channeling all this energy into expanding the Ren'py documentation, herenvardo?
There is a quite simple answer to that question, quoted from a thread you have participated in:
Jake wrote:The people who know what information is needed for on a particular page are by definition the people who can't provide it.
Actually, if people really raise awareness about what's missing on the docs, I'll be giving them higher priority than this project. Also, keep in mind that my knowledge of Ren'py is still limited (this debugger project wouldn't require as much as filling all the gaps in the Ren'py docs; for example, I don't need to know what a function does or what is its intended usage for IronPython to run it when it's called); and there are many parts of the docs I simply couldn't help improving. More specifically, about the issue of lacking examples, I'm often reluctant to add them: would my examples be that useful to other people, or would they simply cause more confussion? :?
jack_norton wrote:I would definitely use it: I'm trying to (slowly) build my "princess maker game" (Spirited Heart) and I have some troubles understanding how to update things on screen and a better debugger would be cool (sometimes the error aren't reported at the exact line but rather the function called).
That's the kind of issue I'm aiming to solve with this project, if I finally pull it forward. Also, about UI issues, make sure you read the spoiler on my initial post :D
Specifically, the part about the visual UI designer, which is intended to mostly mimic Visual Studio's Form designer ;) Actually, the designer was the first thing I thought about of this whole project; but I decided to start with the debugger part because it will probably be the toughest and hardest to get right :P.
jack_norton wrote:From my several year in programming I found out that the best way to learn a new language/tool is with source code examples :)
What about stepping through such examples, seeing what each line or fragment of them is actually doing? ;).
I have failed to meet my deadlines so many times I'm not announcing my projects anymore. Whatever I'm working on, it'll be released when it is ready :P

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#6 Post by jack_norton »

herenvardo wrote: What about stepping through such examples, seeing what each line or fragment of them is actually doing? ;).
Yes, that's even better :)
follow me on Image Image Image
computer games

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#7 Post by PyTom »

This strikes me as a phenomenally difficult project, as you would first have to rewrite large portions of Ren'Py and/or pygame so that they can run under IronPython. Then you'd have to write the gui, and the new stuff.

Frankly, it seems like a multi-year project to me. But don't let that discourage you!
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#8 Post by delta »

You wanted feedback, and I told you what I think. If you want to code a tool that scratches your itch, go right ahead, it's better to have it available than not to have it available. All I am saying is that if you really want to help the community at large (and that would be the point of asking it the first place), the effort could be far better spent elsewhere. As I see it now, this is mostly helpful to a select few projects that are pretty much besides the point of Ren'Py as a VN engine anyway in my opinion, and most of the other projects seem to operate at a level where I wouldn't expect them to know what a debugger even is, much less need one.
The rest is left as an exercise for the reader.

Jo'ogn
Veteran
Posts: 398
Joined: Sat Jul 12, 2008 1:31 pm
Projects: Kassiopeia [iVN]
Location: Deutschland
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#9 Post by Jo'ogn »

delta wrote:the effort could be far better spent elsewhere. As I see it now, this is mostly helpful to a select few projects that are pretty much besides the point of Ren'Py as a VN engine
Agreed! This is the point I am trying to make, too.
jake wrote:The people who know what information is needed for on a particular page are by definition the people who can't provide it.
Oh, did Jake mean to say, that the ppl who know how to program, might not be good at writing documention? <q.e.d.> :wink:
herenvardo wrote:would my examples be that useful to other people, or would they simply cause more confussion?
As there is already confusion, better one example, than none. The more the better (in reason).
jack_norton wrote:probably most of my problems could be solved by lots of examples of the most obscure functions like ui.timer, dynamicdisplayable and such.
Or a doc that covers such functions as fully as possible. So that you would not end up with such problems to begin with.

Let's put it this way: with Ren'Py ~I~ want to focus on my game, the story writing and (for a change) not on playing nerdly with tech. This is why I dropped Flash Actionscript in favour of Ren'Py. I don't expect PyTom do deliver me a perfect system for free. He does the programming and not so much the doc. In other words an advanced Ren'Py debugger would also be an extension of the Ren'Py Documentation ^_^
Audio Plays: [original] The White Feathers Directive - [Star Wars] Through Flame and Shadow
Ren'Py: Kassiopeia [very interactive VN] work in progress - looking for proof reader english

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#10 Post by jack_norton »

Well to be honest most of my problems are due to the missing of a sort of loop system. I mean when I program in C have the loop and on every cycle I check input, do the logic and redraw the screen.
With renpy if I understood correctly that's not the default behaviour. I'm learning python slowly and seems quite easy, but I still haven't managed to do a very simple thing like animating a bar that fills up/down based on a value that changes, even if I'm getting close to find the solution :)
follow me on Image Image Image
computer games

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#11 Post by delta »

Not that this is really relevant to this thread, but I have been able to fake main loop-like functionality with this:
Variable: config.periodic_callback = None

If not None, this should be a function. The function is called, with no arguments, at around 20hz.
The rest is left as an exercise for the reader.

herenvardo
Veteran
Posts: 359
Joined: Sat Feb 25, 2006 11:09 am
Location: Sant Cugat del Vallès (Barcelona, Spain)
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#12 Post by herenvardo »

delta wrote:You wanted feedback, and I told you what I think.
And I'd like to thank you again for that. I trully appreciated your reply, I'm just trying to avoid missunderstandings.
delta wrote:All I am saying is that if you really want to help the community at large (and that would be the point of asking it the first place), the effort could be far better spent elsewhere.
That's the kind of missunderstanding I'm trying to avoid; so let me clarify something:
This project is not aimed to help the community at large. I pursue such aim by other means, like trying to answer questions on these forums (although most of the time someone's faster than me on that, most often PyTom ^^; ), or by offering to help improving the documentation (I'll go a bit deeper on that point later in this post).
I just want to insist in the fact that I'll be giving this project a lower priority than tasks that would help a broader audience, such as the previous examples.
delta wrote:As I see it now, this is mostly helpful to a select few projects [...]
Maybe I would have worded it differently but, simply put, that's it: the debugger project is, beyond doubt, targetted to a very specific audience, which is a quite small subset of this community.
Now, I'm regretting the [ spoiler] tag I used on my initial post, and I'll edit it removing the tag and clarifying some stuff as soon as I finish writting this post (the main reason to use that tag was to avoid people expecting more than I can really offer, since all the stuff described there is very likely to take a while before becoming a reality). Some of the stuff I had put within that "spoiler" might be useful to a broader audience.

Jo'ogn wrote:
delta wrote:the effort could be far better spent elsewhere. As I see it now, this is mostly helpful to a select few projects that are pretty much besides the point of Ren'Py as a VN engine
Agreed! This is the point I am trying to make, too.
Despite the risk of being repetitive, I'll say again that I will normally put the docs at a higher priority than this project. It's only when I don't know of anything else to contribute to the docs, and I find no unanswered questions on the forums that I can help with, and my other projects are paused for any reason (like the current artistic break on the FoJ one), that I'll put some serious effort on this.
Jo'ogn wrote:
jake wrote:The people who know what information is needed for on a particular page are by definition the people who can't provide it.
Oh, did Jake mean to say, that the ppl who know how to program, might not be good at writing documention? <q.e.d.> :wink:
IMHO, and based on that discussion's context, I think the point was that the people who normally know what is missing in the docs are those who need it, so they can't help on adding it; while the people who could fill those gaps won't normally notice them, because they aren't likely to be checking these parts of the docs (after all, they don't need to: they already know this stuff).
In the general case, if something is missing in the documentation, chances are high that noone who could (and would be willing to) fill it is aware of its absence, so the best you can do is mention it to such people so someone fixes it ;) (I'm always among those "willing to" help on this, but not always among those who "could", depending on the topic requiring attention).
Jo'ogn wrote:
herenvardo wrote:would my examples be that useful to other people, or would they simply cause more confussion?
As there is already confusion, better one example, than none. The more the better (in reason).
It's obvious that you haven't seen my code :twisted:. Now, jokes aside, you have a quite good point there, and I'll keep it in mind the next times I go through the docs looking for something to help on ;). That's assuming I can come up with some example that solves a real-world-like problem, rather than being a mere "tech-demo".

Note: if you want to go into a deeper discussion about the Ren'py documentation and how to contribute to it, consider starting a separate thread, or replying to a more relevant one. IMO, this is starting to stray out-of-topic here.
Jo'ogn wrote:Let's put it this way: with Ren'Py ~I~ want to focus on my game, the story writing and (for a change) not on playing nerdly with tech. This is why I dropped Flash Actionscript in favour of Ren'Py.
And even so, you still have to deal with some tech stuff from time to time in Ren'py. What would you say if, instead of this debugger idea, I were offering some sort of code generator that allowed you to pick a name, a color, and a set of styles for a Character and then, in an "Advanced" tab, you're allowed to pick any available function defined in your code files for the callbacks? I'm asking this because this kind of stuff will be part of the entire thing, once the debugger part is mostly done. Review the "spoiler" in the initial post or, even better, wait for me to edit it clarifying some points, to see what I mean :P.
Jo'ogn wrote:I don't expect PyTom do deliver me a perfect system for free.
That's indeed reasonable. My goal is to provide a complement to what PyTom is already delivering, and to provide it for free as well. It's just that I'll be starting with the toughest and most complex part, even if it's not the most useful one, just because it's the toughest and most complex part, and I want to get it out of the way by the time I start working on other elements.
Jo'ogn wrote:In other words an advanced Ren'Py debugger would also be an extension of the Ren'Py Documentation ^_^
Now you got me intrigued. What did you mean with that? I actually had in mind to provide some hooking from the IDE to the docs, but that would still just interfacing the docs, not extending them.
PyTom wrote:This strikes me as a phenomenally difficult project, as you would first have to rewrite large portions of Ren'Py and/or pygame so that they can run under IronPython.
Actually, not that much... it may turn to be even simpler than I initially expected, after seeing that the SDL has some C# bindings: if I can manage to link it from the debugger and expose it to the code running on IronPython, that'd be a huge step forward. Then I'll have to deal with pygame, but that should only involve implementing the parts written in C inside my modified IronPython, and properly exposing them. Finally, I'll have to deal with Ren'py itself, and by the time I do that, you're likely to hear from me :P mostly about the stuff inside the /module folder (OMG! isn't there even a single symbol that doesn't have underscores in that _renpy.c file? That's scarier than Dublin's streets on Halloween :?). Fortunatelly, everything outside that folder is .py or .rpy, so shouldn't bring too many headaches. After that point, when I will probably rename the modified IronPython into something like IronRenpy, everything else should be piece of cake.
PyTom wrote:Then you'd have to write the gui, and the new stuff.
That's the easy trivial part :P. Actually, either the ease of building GUIs on Visual Studio Express or the fluency I have on C# would be enough to compensate for the task of squeezing Ren'py into IronPython; but taking both things together may turn this whole idea into an enjoyable project (no, I'm not masochist, but I enjoy some challenge from time to time) :mrgreen:.
PyTom wrote:Frankly, it seems like a multi-year project to me.
IMHO, it shouldn't take that much. Maybe half-year for the debugger part, and half-year for everything else, at most; although that also depends on how much time do I commit to the task.
PyTom wrote:But don't let that discourage you!
Nah... not even it being a multi-lifetime project would discourage me :P Maybe if someone started raising patent and trademark issues I'd give up (I hate bureaucrazy), but no arguments based on sanity are enough to take an idea out of my twisted sick mind :twisted:.
I have failed to meet my deadlines so many times I'm not announcing my projects anymore. Whatever I'm working on, it'll be released when it is ready :P

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#13 Post by jack_norton »

delta wrote:Not that this is really relevant to this thread, but I have been able to fake main loop-like functionality with this:
Variable: config.periodic_callback = None

If not None, this should be a function. The function is called, with no arguments, at around 20hz.
Ah quite interesting! going to try it right now, maybe my bars will finally move in front of my eyes! 8)
follow me on Image Image Image
computer games

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#14 Post by delta »

Well, all I can say is that it sounds interesting, but with that kind of effort it might be actually easier, cleaner, and ultimately more rational in terms of performance etc., to write a VN engine in .NET from scratch.
The rest is left as an exercise for the reader.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: An advanced debugger for Ren'py: anyone interested?

#15 Post by PyTom »

Hm... It strikes me that there are several unrelated projects here:

Porting Ren'Py to IronPython

This is perhaps a reasonable thing to do, but I don't see the point of it if you're just going to use the SDL libraries. I mean, what does the CLR bring to the equation over CPython. It's something different if you're targeting Silverlight.

Implementing a Debugger for Ren'Py

This is quite interesting, and a good debugger could really help development. But I'm not sure that it's necessary to use anything but python for this. You could, using only python, implement Advanced Watches, Code Stepping, Breakpoints / Run to Cursor.

Trying to repeat the code that caused an exception through stack unwinding seems to be difficult and error-prone to me. Some statements cause side-effects, and trying to redo those would be hard. Your best bet is to used the rollback system to just repeat the statement entirely. But there's no need to use anything more than python for this.

Edit and continue is similar. I'm actually wondering if it doesn't make sense to modify the shift+R reload code so it can take a filename + line somehow, and jump there.

But none of this should require changing IronPython at all... or using anything more than CPython, for that matter.

Implementing an Advance Editor

This is something Ren'Py would really benefit from.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], barsunduk