# Debug macro with a print in console

**URL:** <https://klipper.discourse.group/t/debug-macro-with-a-print-in-console/22621>\
**Category:** General Discussion\
**Created:** [March 23, 2025, 3:48pm UTC](https://klipper.discourse.group/t/debug-macro-with-a-print-in-console/22621 "2025-03-23T15:48:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michastro](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@michastro](https://klipper.discourse.group/u/michastro)\
**Post date:** [March 23, 2025, 3:48pm UTC](https://klipper.discourse.group/t/debug-macro-with-a-print-in-console/22621/1 "2025-03-23T15:48:49Z")

</div>

### Basic Information:

Printer Model: Ender 3 V3 SE  
 MCU / Printerboard: RPI

Hello  
I have a macro to debug but for instance I try to print a variable in console, unfortunatly it doesnt work.  
I try:

```auto
gcode:
    {% set bed_temp = params.BED | default(60) | float %}
    ACTION_RESPOND_INFO "Print Tempe: { bed_temp | round(1) }"

```

Thanks for help

---

<div class="post-metadata">

**Author:** ![3dcoded](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/3dcoded/32/20297_2.png) [@3dcoded](https://klipper.discourse.group/u/3dcoded)\
**Post date:** [March 23, 2025, 9:47pm UTC](https://klipper.discourse.group/t/debug-macro-with-a-print-in-console/22621/2 "2025-03-23T21:47:36Z")

</div>

Hi @michastro ,

To make a macro print in the console, you can use the `RESPOND` command.

1. Make sure there is a `[respond]` line in your `printer.cfg`
2. Use in your macro:

```cfg
[gcode_macro MY_MACRO]
gcode:
    {% set bed_temp = params.BED | default(60) | float %}
    RESPOND MSG="Print Temp: {bed_temp|round(1)}"

```

You can also use `action_respond_info`:

```yaml
{ action_respond_info("Print temp: {bed_temp|round(1)}") }

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [May 22, 2025, 9:47pm UTC](https://klipper.discourse.group/t/debug-macro-with-a-print-in-console/22621/3 "2025-05-22T21:47:55Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
