Sunday, July 3, 2016

Open Debugger in x++

static void main(Args args)
{
    str filePath;
    str cmdLine;
    int pos;
    ;
    filePath = xInfo::componentName();
    pos = strfind(filePath, '\\', strlen(filePath), -strlen(filePath));
    if (pos < 0)
    {
        return;
    }
    filePath  = substr(filePath, 1, pos);
    filePath += 'axdebug.exe';
    cmdLine   = ' "-debugee=axapta"';
    if (!WinAPI::fileExists(filePath))
    {
        error("@SYS70498");
    }
    else if (!WinAPI::shellExecute(filePath, cmdLine))
    {
        error("@SYS70499");
    }
}

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...