V8DebuggerClient: Enable breakpoints on Exceptions

Previously break on exceptions was always enabled. Now, the user
can add a breakpoint on Javascript Exceptions from the breakpoint
window in the debugger.

Change-Id: Ia9ee813d2fccf89b607fe1dcbad47b4084155a48
Reviewed-on: http://codereview.qt-project.org/6348
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2011-10-10 15:25:18 +02:00
parent f1db83be8b
commit 32ef6c563d
8 changed files with 53 additions and 20 deletions

View File

@@ -120,9 +120,10 @@ BreakpointDialog::BreakpointDialog(unsigned engineCapabilities, QWidget *parent)
<< tr("Break when a system call is executed")
<< tr("Break on data access at fixed address")
<< tr("Break on data access at address given by expression")
<< tr("Break on QML signal handler");
<< tr("Break on QML signal handler")
<< tr("Break when JavaScript exception is thrown");
QTC_ASSERT(types.size() == BreakpointOnQmlSignalHandler, return; )
QTC_ASSERT(types.size() == BreakpointAtJavaScriptThrow, return; )
m_ui.comboBoxType->addItems(types);
m_ui.pathChooserFileName->setExpectedKind(Utils::PathChooser::File);
connect(m_ui.comboBoxType, SIGNAL(activated(int)), SLOT(typeChanged(int)));
@@ -352,6 +353,7 @@ void BreakpointDialog::typeChanged(int)
case BreakpointAtExec:
//case BreakpointAtVFork:
case BreakpointAtSysCall:
case BreakpointAtJavaScriptThrow:
break;
case BreakpointByAddress:
case WatchpointAtAddress:
@@ -384,6 +386,7 @@ void BreakpointDialog::typeChanged(int)
case BreakpointAtExec:
//case BreakpointAtVFork:
case BreakpointAtSysCall:
case BreakpointAtJavaScriptThrow:
clearOtherParts(AllConditionParts|ModulePart|TracePointPart);
setPartsEnabled(AllConditionParts|TracePointPart);
break;