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

Disabling the flight in D365FO (CHD - Tier 1)

 INSERT INTO dbo.SYSFLIGHTING(FLIGHTNAME, ENABLED)  VALUES ('<FlightObjectName>_KillSwitch', 1)  or  INSERT INTO dbo.SYSFLIGHT...