# Debug output / settings for debug sessions

**URL:** <https://www.ruby-forum.com/t/debug-output-settings-for-debug-sessions/181284>\
**Category:** Rails\
**Created:** [January 8, 2010, 7:42pm UTC](https://www.ruby-forum.com/t/debug-output-settings-for-debug-sessions/181284 "2010-01-08T19:42:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![trapper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2acd7d/32.png) [@trapper](https://www.ruby-forum.com/u/trapper)\
**Post date:** [January 8, 2010, 7:42pm UTC](https://www.ruby-forum.com/t/debug-output-settings-for-debug-sessions/181284/1 "2010-01-08T19:42:47Z")

</div>

Two questions:

Is it possible, to programmatically print to the debugger?

Is there a configuration file to store a list of commands to be executed  
by the debugger at session start?

---

<div class="post-metadata">

**Author:** ![trapper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2acd7d/32.png) [@trapper](https://www.ruby-forum.com/u/trapper)\
**Post date:** [January 10, 2010, 7:19am UTC](https://www.ruby-forum.com/t/debug-output-settings-for-debug-sessions/181284/2 "2010-01-10T07:19:39Z")

</div>

Hi Fritz T.

```
I did not understand your question.Do you have doubt in running ruby 

```

debugger?If it is then in your application write  
require ‘ruby-debug’  
Then put the below where you want to activate debugger  
debugger

Now start application as ./script/server --debugger You will be  
entered into debugger konsole. There are a number of commands ( example  
l for list,etc…) Type help for available ones

Sijo

---

<div class="post-metadata">

**Author:** ![trapper](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2acd7d/32.png) [@trapper](https://www.ruby-forum.com/u/trapper)\
**Post date:** [January 10, 2010, 12:31pm UTC](https://www.ruby-forum.com/t/debug-output-settings-for-debug-sessions/181284/3 "2010-01-10T12:31:13Z")

</div>

Sijo k g wrote:

> ```
> I did not understand your question.
> 
> ```

Sorry for my bad description. I’m still using the debugger and want to  
optimize my way to use it.

1. Rails has a logging facility, which offers methods to write messages  
to the log.

I’m looking for a technique, that doesn’t write debug messages to the  
log, but to the debugger window. This would make debuggung more  
comfortable by avoiding to retype commands, that are required in many  
debug sessions at the same location in the code.

1. I found, that some set commands entered at the beginning of a debug  
session are very useful.

Is there a possibility to automate entering these commands from a file?
