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

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...