コード例 #1
0
PHPXDebugSetupWizard::PHPXDebugSetupWizard(wxWindow* parent)
    : PHPXDebugSetupWizardBase(parent)
{
    PHPConfigurationData conf;
    conf.Load();
    
    m_textCtrlIP->ChangeValue(conf.GetXdebugHost());
    m_textCtrlKey->ChangeValue(conf.GetXdebugIdeKey());
    m_textCtrlPort->ChangeValue(wxString() << conf.GetXdebugPort());
}
コード例 #2
0
ファイル: XDebugDiagDlg.cpp プロジェクト: LoviPanda/codelite
void XDebugDiagDlg::OnRecommend(wxCommandEvent& event)
{
    wxString endOfLine;
#ifdef __WXMSW__
    endOfLine = "\r\n";
#else
    endOfLine = "\n";
#endif
    PHPConfigurationData config;
    config.Load();
    wxString recommendation;
    recommendation << "xdebug.remote_enable=1" << endOfLine
                   << "xdebug.remote_connect_back=1" << endOfLine
                   << "xdebug.ide_key=\"" << config.GetXdebugIdeKey() << "\"" <<endOfLine;
    ::CopyToClipboard(recommendation);
    ::wxMessageBox(_("Recommended settings have been copied to your clipboard\nOpen your php.ini file and paste them"));
    
}
コード例 #3
0
ファイル: XDebugManager.cpp プロジェクト: gahr/codelite
void XDebugManager::DoStartDebugger()
{
    wxDELETE( m_readerThread );
    m_readerThread = new XDebugComThread(this, GetPort() );
    m_readerThread->Start();

    // Starting event
    XDebugEvent eventStarting(wxEVT_XDEBUG_SESSION_STARTING);
    EventNotifier::Get()->ProcessEvent( eventStarting );
    
    PHPConfigurationData conf;
    conf.Load();
    if ( !conf.HasFlag(PHPConfigurationData::kDontPromptForMissingFileMapping) && GetFileMapping(PHPWorkspace::Get()->GetActiveProject()).empty() ) {
        // Issue a warning
        wxString message;
        message << _("This project has no file mapping defined. This may result in breakpoints not applied\n")
                << _("To fix this, set file mapping from Project Settings -> Debug");
                
        wxRichMessageDialog dlg(EventNotifier::Get()->TopFrame(), message, "CodeLite", wxICON_WARNING|wxOK|wxOK_DEFAULT|wxCANCEL);
        dlg.ShowCheckBox(_("Remember my answer and don't show this message again"));
        dlg.SetOKCancelLabels(_("OK, Continue to Debug"), _("Stop the debugger"));
        int dlgResult = dlg.ShowModal();
        conf.EnableFlag( PHPConfigurationData::kDontPromptForMissingFileMapping, dlg.IsCheckBoxChecked() ).Save();
        if ( dlgResult == wxID_CANCEL ) {
            // Stop the debugger
            DoStopDebugger();
            return;
        }
    }
    
    // Now we can run the project
    if ( !PHPWorkspace::Get()->RunProject(true, "", conf.GetXdebugIdeKey()) ) {
        DoStopDebugger();
        return;
    }

    // Notify about debug session started
    XDebugEvent eventStart(wxEVT_XDEBUG_SESSION_STARTED);
    EventNotifier::Get()->AddPendingEvent( eventStart );

}