MCPcopy Create free account
hub / github.com/anjo76/angelscript / AddFileBreakPoint

Method AddFileBreakPoint

sdk/add_on/debugger/debugger.cpp:802–823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802void CDebugger::AddFileBreakPoint(const string &file, int lineNbr)
803{
804 // Store just file name, not entire path
805 size_t r = file.find_last_of("\\/");
806 string actual;
807 if( r != string::npos )
808 actual = file.substr(r+1);
809 else
810 actual = file;
811
812 // Trim the file name
813 size_t b = actual.find_first_not_of(" \t");
814 size_t e = actual.find_last_not_of(" \t");
815 actual = actual.substr(b, e != string::npos ? e-b+1 : string::npos);
816
817 stringstream s;
818 s << "Setting break point in file '" << actual << "' at line " << lineNbr << endl;
819 Output(s.str());
820
821 BreakPoint bp(actual, lineNbr, false);
822 m_breakPoints.push_back(bp);
823}
824
825void CDebugger::PrintHelp()
826{

Callers

nothing calls this directly

Calls 2

strMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected