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

Upload file CSV/TXT using SysOperation in D365 X++

Upload CSV/TXT using SysOperation X++ Contract: /// <summary> /// Contract class upload through excel for PO inbound journals /// <...