Breakpoints, Stepping Through, Intelli-sense Iron-Python?

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.
Post Reply
Message
Author
HypnoKitten
Regular
Posts: 30
Joined: Tue May 20, 2014 3:22 pm
Contact:

Breakpoints, Stepping Through, Intelli-sense Iron-Python?

#1 Post by HypnoKitten »

Hi everyone, know I went quiet again for a bit - that's because you were all so insanely awesome that you solved all the problems I'd had and I've been hard at work since. More specifically though I've been doing a bunch of stuff Python-side to implement the kind of game-play I was curious about - slow going with full-time job, but going none-the-less. The ability to console in has helped a bit with debugging (love that I execute commands like in VS's intermediate window.. actually this seems even more powerful in some ways) but...

So I am having two things slowing me down a lot. Not blocking me, just slowing more than with my normal coding practices. Lack of intelli-sense is the biggest one - not having auto-suggestions as I type, not being to click into a python function and then 'back' my way back out of it, not being able to mouse-over to see what a function expects.. just makes for a good bit of back-and-forth clicking, especially with older files or when I have to take a week off.

Not being able to set a breakpoint and then step through code is the other big troubleshooting issue, I end up having to put a lot more debug statements then I like to maintain. (I've made myself some helper functions for that, but it still leads to some giant log files)

So then I noticed two things that got me curious... I *can* set a breakpoint. At least I can click on the side-bar in the RenPy editor and one seems to appear.. is that what I think it is? Is there a way of using it to break and then step through code? How do you do that?

And I noticed this thread: http://lemmasoft.renai.us/forums/viewto ... 8&start=15 I don't want to resurrect a thread that old, but did anything ever come of it? Did anyone do something to at least allow the Python development in VisualStudio while still running them through Ren'Py for execution? I have some hacks I've been working on (basically just using IronPython Test function support to execute the Python side of things... works to some small degree for the parts that do not call into RenPy at all) but suggestions are welcome

Anyway, nothing ground-breaking here, still loving Ren'Py (great job!!), just curious

nintendotoad
Regular
Posts: 42
Joined: Sat Mar 31, 2012 2:56 pm
Location: projectexist.net
Contact:

Re: Breakpoints, Stepping Through, Intelli-sense Iron-Python

#2 Post by nintendotoad »

> Breakpoints

If you're using Editra, those actually aren't Breakpoints you're toggling on the left-side. That's actually a "Bookmark", and (to an extent...) behaves as such. It wouldn't behave as a breakpoint anyway, since Editra is not a debugger/compiler/fancy thing. (Breakpoints are easy to fake with if config.developer: renpy.say(*), but I have no idea how stepping-through would work. You could use callbacks, but that would only allow you to step through after a function call/character say. pdb could to an extent, work.)

> Intelli-Sense

This is the other way around; an editor feature that jEdit and Editra both (I believe) lack. On the odd day where I'm making... poor life decisions, I find myself using Sublime Text, which does have the Intelli-Sense you seem to be talking about (although it has no Ren'Py-specific helper files. (In other words, it would probably be easier to make another Ren'Py config file for another text editor rather than force the feature into the current text editors that we have.)

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: Breakpoints, Stepping Through, Intelli-sense Iron-Python

#3 Post by PyTom »

If someone wants to develop this, I'd do everything I can to support you. I just don't think I have the time to add it and also do everything else I need to do to develop Ren'Py.
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

HypnoKitten
Regular
Posts: 30
Joined: Tue May 20, 2014 3:22 pm
Contact:

Re: Breakpoints, Stepping Through, Intelli-sense Iron-Python

#4 Post by HypnoKitten »

No worries at all PyTom, you're doing totally awesome and I'm loving the work you're doing, I'd never wanna distract you from that! I'm pretty much a newbie to working with Python so I am not qualified yet to work at that level at the code, but if I figure out any good workarounds I'll post them here. I think I'll be able to get by with Visual Studio, might be able to just write a mini-text-editing app to convert a pre-defined header back and forth between Ren'Py's python: to the initialize visual studio is expecting. :)

Post Reply

Who is online

Users browsing this forum: Google [Bot]