Announcement

Collapse
No announcement yet.

How to Debug.Trace a custom?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Debug.Trace a custom?

    Example
    Code:
    Debug.GetEventContext("Plugin1")
    Debug.GetTraceMode("Plugin1")
    So it will show the debug script of "Plugin1"

  • #2
    check this :

    Personally I suggest the trace mode and the best way to use it is to put this code on the On Startup event (Menubar > Project > Actions.. )
    Code:
     Debug.ShowWindow(true); 
       Debug.SetTraceMode(true);

    Comment


    • #3
      i guess u didn't understand my problem, sry

      Comment


      • #4
        Sorry you cannot use debug that way, your code - it does and means nothing
        from help examples:

        errmsg = "Error #" .. Application.GetLastError().. " in " .. Debug.GetEventContext();

        Uses the concatenation operator (..) to form an error message containing the last error code and the current event context and stores the error message in a variable named "errmsg."


        trace_mode = Debug.GetTraceMode();

        Stores the current trace mode (true/false) in a variable named "trace_mode."


        Code:
        local tAllFiles=FindExtensions(sFolder, tExt)
        if tAllFiles then
            [COLOR=#FF0000]Debug.ShowWindow()[/COLOR]
            for i, sFile in pairs(tAllFiles) do
               [COLOR=#FF0000] Debug.Print(sFile.."\r\n")[/COLOR]
            end
        end
        Code:
        function DialogEx.Show(sDialogName, bParentCoordinates, nX, nY)
        assert(type(sDialogName) == "string", [COLOR=#FF0000]Debug.GetEventContext()[/COLOR].."\r\nArgument 1 must be of type string.");
            
        if not (bParentCoordinates) then
        bParentCoordinates = false;
        end
            
        local vRet = DialogEx_Show(sDialogName, bParentCoordinates, nX, nY);
            
        
        local vRet = DialogEx_Return;
        DialogEx_Return = nil;
        return vRet;
        end

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎