• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ XDebugEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中XDebugEvent的典型用法代码示例。如果您正苦于以下问题:C++ XDebugEvent类的具体用法?C++ XDebugEvent怎么用?C++ XDebugEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了XDebugEvent类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnProperytGet

void LocalsView::OnProperytGet(XDebugEvent& e)
{
    e.Skip();
    // An item was evaluated using property_get
    std::map<wxString, wxDataViewItem>::iterator iter = m_waitingExpand.find( e.GetEvaluted() );
    if ( iter == m_waitingExpand.end() ) {
        return;
    }
    
    wxDataViewItem item = iter->second;
    m_waitingExpand.erase( iter );
    
    // Delete the fake node
    wxDataViewItemArray children;
    m_dataviewModel->GetChildren( item, children );
    if ( !children.IsEmpty() ) {
        m_dataviewModel->DeleteItems( item, children );
    }
    
    XVariable::List_t vars = e.GetVariables();
    if ( vars.empty() ) 
        return;
    
    // Since we got here from property_get, XDebug will reply with the specific property (e.g. $myclass->secondClass)
    // and all its children. Howeverr, $myclass->secondClass already exist in the tree
    // so we are only interested with its children. so we use here vars.begin()->children (vars is always list of size == 1)
    wxASSERT_MSG(vars.size() == 1, "property_get returned list of size != 1");
    XVariable::List_t childs;
    childs = vars.begin()->children;

    if ( !childs.empty() ) {
        AppendVariablesToTree( item, childs );
        m_dataview->Expand( item );
    }
}
开发者ID:Jactry,项目名称:codelite,代码行数:35,代码来源:localsview.cpp


示例2: OnDBGPCommandEvaluated

void EvalPane::OnDBGPCommandEvaluated(XDebugEvent& e)
{
    e.Skip();
    m_stcOutputXDebug->SetEditable(true);
    m_stcOutputXDebug->ClearAll();
    m_stcOutputXDebug->SetText(e.GetEvaluted());
    m_stcOutputXDebug->SetEditable(true);
    m_stcOutputXDebug->ScrollToEnd();
}
开发者ID:05storm26,项目名称:codelite,代码行数:9,代码来源:evalpane.cpp


示例3: OnGotFocusFromXDebug

void XDebugManager::OnGotFocusFromXDebug(XDebugEvent& e)
{
    e.Skip();
    
    // Make sure codelite is "Raised"
    wxFrame* frame = EventNotifier::Get()->TopFrame();
    if ( frame->IsIconized() || !frame->IsShown() ) {
        frame->Raise();
    }
    
    CL_DEBUG("CodeLite: opening file %s:%d", e.GetFileName(), e.GetLineNumber()+1 ); // The user sees the line number from 1 (while scintilla counts them from 0)
    
    // Mark the debugger line / file
    IEditor *editor = m_plugin->GetManager()->FindEditor( e.GetFileName() );
    if ( !editor && wxFileName::Exists(e.GetFileName()) ) {
        // Try to open the editor
        if ( m_plugin->GetManager()->OpenFile(e.GetFileName(), "", e.GetLineNumber()) ) {
            editor = m_plugin->GetManager()->GetActiveEditor();
        }
    }
    
    if ( editor ) {
        m_plugin->GetManager()->SelectPage( editor->GetSTC() );
        SetDebuggerMarker( editor->GetSTC(), e.GetLineNumber() );
    }
    
    // Update the callstack/locals views
    DoRefreshDebuggerViews();
    
    // Re-apply any new breakpoints
    DoApplyBreakpoints();
}
开发者ID:gahr,项目名称:codelite,代码行数:32,代码来源:XDebugManager.cpp


示例4: OnXDebugSessionStarting

void PHPDebugPane::OnXDebugSessionStarting(XDebugEvent& event)
{
    event.Skip();
    m_console->SetTerminal(PHPWorkspace::Get()->GetTerminalEmulator());
    LexerConf::Ptr_t phpLexer = ColoursAndFontsManager::Get().GetLexer("php");
    if(phpLexer) { phpLexer->Apply(m_console->GetTerminalOutputWindow()); }
}
开发者ID:eranif,项目名称:codelite,代码行数:7,代码来源:PHPDebugPane.cpp


示例5: OnXDebugSessionEnded

void PHPDebugPane::OnXDebugSessionEnded(XDebugEvent& e)
{
    e.Skip();
    // Clear the stacktrace view
    m_dvListCtrlStackTrace->DeleteAllItems();
    m_console->SetTerminal(NULL);
}
开发者ID:05storm26,项目名称:codelite,代码行数:7,代码来源:PHPDebugPane.cpp


示例6: OnExpressionEvaluate

void EvalPane::OnExpressionEvaluate(XDebugEvent& e)
{
    if ( e.GetEvalReason() == XDebugEvalCmdHandler::kEvalForEvalPane ) {
        
        m_stcOutput->SetEditable(true);
        m_stcOutput->ClearAll();


        wxString str;
        if ( !e.IsEvalSucceeded() ) {
            str << _("*** Error evaluating expression: ") << e.GetString() << "\n"
                << e.GetErrorString();
        } else {
            str << e.GetString() << " = \n";
            wxString evaluated = e.GetEvaluted();
            // Reomve extra escapes
            evaluated.Replace("\\n", "\n");
            evaluated.Replace("\\t", "\t");
            evaluated.Replace("\\r", "\r");
            evaluated.Replace("\\v", "\v");
            evaluated.Replace("\\b", "\b");
            str << evaluated;
        }

        m_stcOutput->AppendText( str );
        m_stcOutput->SetEditable(false);
        m_stcOutput->ScrollToEnd();
        
    } else {
        e.Skip();
    }
}
开发者ID:05storm26,项目名称:codelite,代码行数:32,代码来源:evalpane.cpp


示例7: OnUpdateStackTrace

void PHPDebugPane::OnUpdateStackTrace(XDebugEvent& e)
{
    e.Skip();
    m_dvListCtrlStackTrace->DeleteAllItems();

    const wxArrayString& calls = e.GetStrings();
    for(size_t i = 0; i < calls.GetCount(); ++i) {
        wxArrayString elements = ::wxStringTokenize(calls.Item(i), "|", wxTOKEN_RET_EMPTY);
        if(elements.GetCount() == 4) {
            wxVector<wxVariant> cols;
            cols.push_back(::MakeBitmapIndexText(elements.Item(0), ((int)i == e.GetInt()) ? 0 : 1)); // Level
            cols.push_back(elements.Item(1));                                                        // Where
            cols.push_back(::URIToFileName(elements.Item(2)));                                       // File
            cols.push_back(elements.Item(3));                                                        // Line
            m_dvListCtrlStackTrace->AppendItem(cols);
        }
    }
}
开发者ID:eranif,项目名称:codelite,代码行数:18,代码来源:PHPDebugPane.cpp


示例8: OnBreakpointsViewUpdated

void XDebugManager::OnBreakpointsViewUpdated(XDebugEvent& e)
{
    e.Skip();
    IEditor::List_t editors;
    m_plugin->GetManager()->GetAllEditors( editors, true );
    IEditor::List_t::iterator iter = editors.begin();
    for(; iter != editors.end(); ++iter ) {
        DoRefreshBreakpointsMarkersForEditor( *iter );
    }
}
开发者ID:gahr,项目名称:codelite,代码行数:10,代码来源:XDebugManager.cpp


示例9: OnXDebugSessionEnded

void LocalsView::OnXDebugSessionEnded(XDebugEvent &e)
{
    e.Skip();
    CL_DEBUG("LocalsView::OnXDebugSessionEnded(): Debug sessions started - cleaning all locals view");
    // Clear the variables view
    m_dataviewModel->Clear();
    m_localsExpandedItemsFullname.clear();
    m_localsExpandedItems.Clear();
    m_waitingExpand.clear();
}
开发者ID:Jactry,项目名称:codelite,代码行数:10,代码来源:localsview.cpp


示例10: OnDebugStarted

void PhpPlugin::OnDebugStarted(XDebugEvent& e)
{
    e.Skip();
    DoEnsureXDebugPanesVisible();
    m_toggleToolbar = !m_mgr->IsToolBarShown();
    if(m_toggleToolbar) {
        // toolbar not shown
        m_mgr->ShowToolBar();
    }
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:10,代码来源:php.cpp


示例11: OnLocalsUpdated

void LocalsView::OnLocalsUpdated(XDebugEvent& e)
{
    e.Skip();
    CL_DEBUG("Inside OnLocalsUpdated");

    m_dataviewModel->Clear();
    m_localsExpandedItems.Clear();

    const XVariable::List_t& vars = e.GetVariables();
    AppendVariablesToTree( wxDataViewItem(NULL), vars );

    // Expand the items that were expanded before the view refresh
    for(size_t i=0; i<m_localsExpandedItems.GetCount(); ++i) {
        // Ensure it is visible
        m_dataview->EnsureVisible( m_localsExpandedItems.Item(i) );
        // Ensure its expanded
        m_dataview->Expand( m_localsExpandedItems.Item(i) );
    }
    m_localsExpandedItems.Clear();
}
开发者ID:Jactry,项目名称:codelite,代码行数:20,代码来源:localsview.cpp


示例12: OnDebugEnded

// Debugger events
void PhpPlugin::OnDebugEnded(XDebugEvent& e)
{
    e.Skip();

    // Save the layout
    wxFileName fnConfig(clStandardPaths::Get().GetUserDataDir(), "xdebug-perspective");
    fnConfig.AppendDir("config");

    wxFFile fp(fnConfig.GetFullPath(), "w+b");
    if(fp.IsOpened()) {
        fp.Write(m_mgr->GetDockingManager()->SavePerspective());
        fp.Close();
    }

    if(!m_savedPerspective.IsEmpty()) {
        m_mgr->GetDockingManager()->LoadPerspective(m_savedPerspective);
        m_savedPerspective.Clear();
    }
}
开发者ID:nagyist,项目名称:eranit-codelite,代码行数:20,代码来源:php.cpp


示例13: OnRefreshBreakpointsView

void PHPDebugPane::OnRefreshBreakpointsView(XDebugEvent& e)
{
    e.Skip();
    LexerConf::Ptr_t lex = EditorConfigST::Get()->GetLexer("php");
    if(lex) {
        m_dvListCtrlBreakpoints->SetFont(lex->GetFontForSyle(wxSTC_HPHP_DEFAULT));
        m_dvListCtrlStackTrace->SetFont(lex->GetFontForSyle(wxSTC_HPHP_DEFAULT));
    }

    // Load the breakpoints table
    m_dvListCtrlBreakpoints->DeleteAllItems();
    const XDebugBreakpoint::List_t& bps = XDebugManager::Get().GetBreakpointsMgr().GetBreakpoints();
    XDebugBreakpoint::List_t::const_iterator iter = bps.begin();
    for(; iter != bps.end(); ++iter) {
        wxVector<wxVariant> cols;
        cols.push_back(wxString() << iter->GetBreakpointId());
        cols.push_back(iter->GetFileName());
        cols.push_back(wxString() << iter->GetLine());
        m_dvListCtrlBreakpoints->AppendItem(cols);
    }
}
开发者ID:05storm26,项目名称:codelite,代码行数:21,代码来源:PHPDebugPane.cpp


示例14: OnShowTooltip

void XDebugManager::OnShowTooltip(XDebugEvent& e)
{
    if ( e.GetEvalReason() == XDebugEvalCmdHandler::kEvalForTooltip ) {
        wxString str;
        if ( !e.IsEvalSucceeded() ) {
            str << _("<color=\"red\">*** Error evaluating expression : </color><strong>") << e.GetString() << "</strong>\n<hr>"
                << e.GetErrorString();
        } else {
            str << "<b>" << e.GetString() << "</b>\n<hr>";
            wxString evaluated = e.GetEvaluted();
            // Reomve extra escapes
            evaluated.Replace("\\n", "\n");
            evaluated.Replace("\\t", "\t");
            evaluated.Replace("\\r", "\r");
            evaluated.Replace("\\v", "\v");
            evaluated.Replace("\\b", "\b");
            str << evaluated;
            str.Trim();
        }
        m_plugin->GetManager()->GetActiveEditor()->ShowRichTooltip( str, wxNOT_FOUND );
    } else {
        e.Skip();
    }
}
开发者ID:gahr,项目名称:codelite,代码行数:24,代码来源:XDebugManager.cpp


示例15: OnXDebugSessionStarted

void PHPDebugPane::OnXDebugSessionStarted(XDebugEvent& e)
{
    e.Skip();
    OnRefreshBreakpointsView(e);
    m_console->Clear();
}
开发者ID:05storm26,项目名称:codelite,代码行数:6,代码来源:PHPDebugPane.cpp


示例16: OnXDebugStopped

void XDebugManager::OnXDebugStopped(XDebugEvent& e)
{
    e.Skip();
    DoStopDebugger();
}
开发者ID:gahr,项目名称:codelite,代码行数:5,代码来源:XDebugManager.cpp


示例17: OnDebugSatrted

void PhpPlugin::OnDebugSatrted(XDebugEvent& e)
{
    e.Skip();
    DoEnsureXDebugPanesVisible();
}
开发者ID:nagyist,项目名称:eranit-codelite,代码行数:5,代码来源:php.cpp



注:本文中的XDebugEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ XElement类代码示例发布时间:2022-05-31
下一篇:
C++ XCoreFunctionInfo类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap