Changeset View
Changeset View
Standalone View
Standalone View
debugger/debugjob.cpp
Show All 33 Lines | |||||
34 | namespace Python { | 34 | namespace Python { | ||
35 | 35 | | |||
36 | 36 | | |||
37 | void DebugJob::start() | 37 | void DebugJob::start() | ||
38 | { | 38 | { | ||
39 | QStringList program; | 39 | QStringList program; | ||
40 | QString debuggerUrl = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kdevpythonsupport/debugger", QStandardPaths::LocateDirectory) + "/kdevpdb.py"; | 40 | QString debuggerUrl = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kdevpythonsupport/debugger", QStandardPaths::LocateDirectory) + "/kdevpdb.py"; | ||
41 | program << m_interpreter << "-u" << debuggerUrl << m_scriptUrl.toLocalFile() << m_args; | 41 | program << m_interpreter << "-u" << debuggerUrl << m_scriptUrl.toLocalFile() << m_args; | ||
42 | m_session = new DebugSession(program, m_workingDirectory); | 42 | // Inject environment | ||
43 | m_session = new DebugSession(program, m_workingDirectory, m_environment); | ||||
43 | 44 | | |||
44 | setStandardToolView(KDevelop::IOutputView::DebugView); | 45 | setStandardToolView(KDevelop::IOutputView::DebugView); | ||
45 | setBehaviours(KDevelop::IOutputView::Behaviours(KDevelop::IOutputView::AllowUserClose) | KDevelop::IOutputView::AutoScroll); | 46 | setBehaviours(KDevelop::IOutputView::Behaviours(KDevelop::IOutputView::AllowUserClose) | KDevelop::IOutputView::AutoScroll); | ||
46 | OutputModel* pyOutputModel = new KDevelop::OutputModel(); | 47 | OutputModel* pyOutputModel = new KDevelop::OutputModel(); | ||
47 | pyOutputModel->setFilteringStrategy(OutputModel::ScriptErrorFilter); | 48 | pyOutputModel->setFilteringStrategy(OutputModel::ScriptErrorFilter); | ||
48 | setModel(pyOutputModel); | 49 | setModel(pyOutputModel); | ||
49 | setTitle(m_interpreter + m_scriptUrl.toLocalFile()); | 50 | setTitle(m_interpreter + m_scriptUrl.toLocalFile()); | ||
50 | 51 | | |||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |