Shortcut to Reset/Stop debugger

M

Michelle

Hello, I use F5 and F8 to run and debug my code, is there a key that will
stop the debugger?

I always feel like 'Esc' should do it, but it doesn't

M
 
P

Peter T

F5 will run the code so the only way to stop, or rather 'break' is with
ctrl-Break or Esc. If you then press Enter you will be in debug mode as if
you had started with F8.

In debug mode to stop or reset, apart from clicking the button you could
do -

Alt-r, r

(might be different in non-English systems)

Regards,
Peter T
 
M

Michelle

I don't want to have to do all that bloomin' clicking! I'm looking for a
single click solution! :)

M
 
P

Peter T

So what's wrong with alt-r, r

Regards,
Peter T

Michelle said:
I don't want to have to do all that bloomin' clicking! I'm looking for a
single click solution! :)

M
 
C

Chip Pearson

There is no such shortcut because there is really no such command for
a shortcut to point to. You set the EnableCancelKey property to
xlInterrupt which will cause the debugger to stop on the currently
executing command. This is fine for development and testing, but
should not be used in production code for the end users.

Sub AAA()
Application.EnableCancelKey = xlInterrupt
' your code here
End Sub

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 
M

Michelle

I'm not sure that's what I want... I mean that when I'm debugging code and
I've found and fixed the problem, I want to 'lose the yellow line', I want
to (with ONE keypress), be ready to run again, not have to find my mouse and
click the Stop/Reset button at the top, then click F5 to start over. Does
that make sense?

Cheers
M


Chip Pearson said:
There is no such shortcut because there is really no such command for
a shortcut to point to. You set the EnableCancelKey property to
xlInterrupt which will cause the debugger to stop on the currently
executing command. This is fine for development and testing, but
should not be used in production code for the end users.

Sub AAA()
Application.EnableCancelKey = xlInterrupt
' your code here
End Sub

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




Hello, I use F5 and F8 to run and debug my code, is there a key that will
stop the debugger?

I always feel like 'Esc' should do it, but it doesn't

M
 
M

Matthew Herbert

Michelle,

If you stopped code execution (temporarily or permanently), you can continue
code execution via F5. For example, if you Step Into the code (F8) or Break
the code (F9 or Stop), you can run the code at full speed by pressing F5,
regardless of where the break is in your code.

Best,

Matthew Herbert

Michelle said:
I'm not sure that's what I want... I mean that when I'm debugging code and
I've found and fixed the problem, I want to 'lose the yellow line', I want
to (with ONE keypress), be ready to run again, not have to find my mouse and
click the Stop/Reset button at the top, then click F5 to start over. Does
that make sense?

Cheers
M


Chip Pearson said:
There is no such shortcut because there is really no such command for
a shortcut to point to. You set the EnableCancelKey property to
xlInterrupt which will cause the debugger to stop on the currently
executing command. This is fine for development and testing, but
should not be used in production code for the end users.

Sub AAA()
Application.EnableCancelKey = xlInterrupt
' your code here
End Sub

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




Hello, I use F5 and F8 to run and debug my code, is there a key that will
stop the debugger?

I always feel like 'Esc' should do it, but it doesn't

M
 
M

Michelle

OK... that's how I RUN the code, but I want to STOP the code.

Any ideas?

M


Matthew Herbert said:
Michelle,

If you stopped code execution (temporarily or permanently), you can
continue
code execution via F5. For example, if you Step Into the code (F8) or
Break
the code (F9 or Stop), you can run the code at full speed by pressing F5,
regardless of where the break is in your code.

Best,

Matthew Herbert

Michelle said:
I'm not sure that's what I want... I mean that when I'm debugging code
and
I've found and fixed the problem, I want to 'lose the yellow line', I
want
to (with ONE keypress), be ready to run again, not have to find my mouse
and
click the Stop/Reset button at the top, then click F5 to start over. Does
that make sense?

Cheers
M


Chip Pearson said:
There is no such shortcut because there is really no such command for
a shortcut to point to. You set the EnableCancelKey property to
xlInterrupt which will cause the debugger to stop on the currently
executing command. This is fine for development and testing, but
should not be used in production code for the end users.

Sub AAA()
Application.EnableCancelKey = xlInterrupt
' your code here
End Sub

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




On Tue, 9 Feb 2010 11:43:54 -0000, "Michelle"

Hello, I use F5 and F8 to run and debug my code, is there a key that
will
stop the debugger?

I always feel like 'Esc' should do it, but it doesn't

M
 
C

Chip Pearson

If you are stepping through code using F8 and you sitting on the line
that is ready to execute or at a breakpoint, F5 will resume normal
execution until another breakpoint or assert is encountered. No need
to use any of the menu items. F5 by itself is sufficient to resume
normal execution.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]


I'm not sure that's what I want... I mean that when I'm debugging code and
I've found and fixed the problem, I want to 'lose the yellow line', I want
to (with ONE keypress), be ready to run again, not have to find my mouse and
click the Stop/Reset button at the top, then click F5 to start over. Does
that make sense?

Cheers
M


Chip Pearson said:
There is no such shortcut because there is really no such command for
a shortcut to point to. You set the EnableCancelKey property to
xlInterrupt which will cause the debugger to stop on the currently
executing command. This is fine for development and testing, but
should not be used in production code for the end users.

Sub AAA()
Application.EnableCancelKey = xlInterrupt
' your code here
End Sub

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




Hello, I use F5 and F8 to run and debug my code, is there a key that will
stop the debugger?

I always feel like 'Esc' should do it, but it doesn't

M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top