// PUBLIC MEMBERS
- property bool isActiveForCurrentConfig
- {
- get
- {
- return ide.project && ide.project.config == prjConfig && (state == running || state == stopped) ? true : false;
- }
- }
+ property bool isActive { get { return state == running || state == stopped; } }
+ property bool isPrepared { get { return state == loaded || state == running || state == stopped; } }
void Resume()
{
bool DontTerminateDebugSession(char * title)
{
- if(debugger.isActiveForCurrentConfig)
+ if(debugger.isActive)
{
if(MessageBox { type = yesNo, master = ide,
contents = "Do you want to terminate the debugging session in progress?",
}
//SetBool excludeFromBuild;
+ property bool configIsInActiveDebugSession
+ {
+ get
+ {
+#ifndef MAKEFILE_GENERATOR
+ return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isActive;
+#endif
+ }
+ }
+
+ property bool configIsInDebugSession
+ {
+ get
+ {
+#ifndef MAKEFILE_GENERATOR
+ return ide.project == this && ide.debugger && ide.debugger.prjConfig == config && ide.debugger.isPrepared;
+#endif
+ }
+ }
+
void SetPath(bool projectsDirs)
{
#ifndef MAKEFILE_GENERATOR
~ProjectView()
{
- ide.debugger.Stop();
+ DebugStop();
ide.DestroyTemporaryProjectDir();
if(project)
{
if(node)
prj = node.project;
}
- if(prj != project || !ide.DontTerminateDebugSession("Project Build"))
+ if(/*prj != project || */!prj.configIsInDebugSession || !ide.DontTerminateDebugSession("Project Build"))
BuildInterrim(prj, build, false);
return true;
}
{
DirExpression targetDir = prj.targetDir;
- if(buildType != run && prj == project && ide.debugger.isActiveForCurrentConfig)
- ide.debugger.Stop();
+ if(buildType != run/* && prj == project*/ && prj.configIsInDebugSession)
+ DebugStop();
// TODO: Disabled until problems fixed... is it fixed?
if(buildType == rebuild || (prj.config && prj.config.compilingModified))