sa-mp debugger
#1

One of my favourite things when programming is the debugger. That one, where you set breakpoints, code execution stops at this point and you can inspect various variables. You can ****** more about it, it's very awesome. Well, when coding for sa-mp, you have to use these ugly print messages...
Is it theorically possible to use a debugger when coding for sa-mp? Maybe anyone tried something? Because afaik the code isn't executed directly from compiled .amx file. Any thoughts about it?
Reply
#2

It would be impractical. The debugger follows the logical flow of code. If an if-statement returns false then that block is skipped. Therefor you would need to simulate players somehow.
Reply
#3

Yeah, but you could somehow be that one player on whose debugger is working(maybe with client-side plugin help). So it should be teorically possible to somehow use a debugger.
Reply
#4

One could program an IDE and integrate the AMX machine into it, then compile the script with debug symbols. Break points could be implemented like that: you set a break point in the IDE and when compiling, the IDE adds a special native at that line. When code gets executed and the code executes the native, the native pauses the pawn thread. Only problem is reading data from stack, I don't have enough experience to tell if this is possible. Also if some runtime error happens it should be no problem to pause the pawn thread at the line of code where that error happened.
Almost everything is possible in theory
Reply
#5

It already exists and you can compile it, though it's command-line based.
Reply
#6

Quote:
Originally Posted by JoBullet
Посмотреть сообщение
It already exists and you can compile it, though it's command-line based.
can you give us more information about it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)