Penny Posted August 28, 2009 Share Posted August 28, 2009 (edited) http://msdn.microsoft.com/en-us/library/system.diagnostics.stacktrace.aspx I used these in C# to find out exactly where and why I was having a problem. The code I used (RunUO, in case anyone knows...) basically stacktraced if the script crashed, telling you the lines and successive calls that took you to crashing. for instance called Init() on line 5 called ThisWillEventuallyCrashIt() on line 112 called ThisWillCrashIt() on line 321 div/0 on line 342 I hope someone understood what I want to do Edit: For instance, this is the code I use to handle the errors myself Func ErrorLog($msg) _FileWriteLog(@ScriptDir & "\error.log", $msg) EndFunc Func ErrorHandling() ConsoleWrite(@CRLF & '-- Handled Error: "' & $ErrorHandler.Description & '"') Dim $h = Hex($ErrorHandler.Number, 8) Dim $strMsg = "Error Number: 0x" & $h & @CRLF $strMsg &= "Description: " & $ErrorHandler.Description & @CRLF $strMsg &= "Script Line: " & $ErrorHandler.ScriptLine & @CRLF If $Script_DebugMode Then ConsoleWrite(@CRLF & $strMsg) EndIf ErrorLog("0x" & $h & ": " & $ErrorHandler.Description) SetError(1) If $Script_onerror_Exit Then MsgBox(4096,"Critical Error",$strMsg & @CRLF & @CRLF & "Application terminated.") Exit EndIf EndFunc how would I add some beatiful StackTraces to that? is it even possible? =( Thanks!! Edited August 28, 2009 by Penny Link to comment Share on other sites More sharing options...
Penny Posted August 28, 2009 Author Share Posted August 28, 2009 can anyone help me with this? thanks... Link to comment Share on other sites More sharing options...
WolfWorld Posted August 28, 2009 Share Posted August 28, 2009 No you can't, Autoit does not work based on stack like .NET platform does. So it's not possible. You could go into Scite and click on trace all line. Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets! Link to comment Share on other sites More sharing options...
Penny Posted August 28, 2009 Author Share Posted August 28, 2009 how would I do that? sorry I'm new to autoit =( Link to comment Share on other sites More sharing options...
Bert Posted August 28, 2009 Share Posted August 28, 2009 Under the tools menu you will see trace. Use that. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
jvanegmond Posted August 28, 2009 Share Posted August 28, 2009 There is a nice graphical debugger available, that is somewhat like Visual Studio. Check it out here: http://www.autoitscript.com/forum/index.php?showtopic=21834 github.com/jvanegmond Link to comment Share on other sites More sharing options...
herewasplato Posted August 28, 2009 Share Posted August 28, 2009 You will need to have the full version of SciTE4AtutoIt3:http://www.autoitscript.com/autoit3/scite/downloads.shtml"Lite" version that comes with the regular AutoIt installfull version [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Penny Posted August 29, 2009 Author Share Posted August 29, 2009 You will need to have the full version of SciTE4AtutoIt3:http://www.autoitscript.com/autoit3/scite/downloads.shtml"Lite" version that comes with the regular AutoIt installfull versionYeah I had the lite version.....wow, that way of tracing errors (commenting absolutely every function) is rather untraditional (specially since I had a timer flying around, haha) but it got me there, so.. Thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now