<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic" -->

---
title: IntelliJ IDEA Spring Debugger with H2 Database | daily.dev
description: A walkthrough shows how to use the IntelliJ IDEA Spring Debugger plugin, which automatically detects database connection details (like randomly assigned ports...
canonical: https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: IntelliJ IDEA Spring Debugger with H2 Database | daily.dev
og:description: A walkthrough shows how to use the IntelliJ IDEA Spring Debugger plugin, which automatically detects database connection details (like randomly assigned ports...
og:url: https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic
og:image: https://api.daily.dev/og/posts/XEmY7WgIC.png
og:image:alt: IntelliJ IDEA Spring Debugger with H2 Database
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# IntelliJ IDEA Spring Debugger with H2 Database

**[SivaLabs \(YouTube\)](https://daily.dev/sources/sivalabs-youtube)** · 10 min read · 0 upvotes · 0 comments

## Summary

A walkthrough shows how to use the IntelliJ IDEA Spring Debugger plugin, which automatically detects database connection details (like randomly assigned ports from Testcontainers or Docker Compose) and registers them in IntelliJ's database panel. This works out of the box with PostgreSQL and MySQL, but not with the H2 in-memory database. The workaround: switch H2 from in-memory to file-system-based storage and add the auto server=true flag, which allows Spring Debugger to detect and register the connection. The presenter still recommends using the actual production database (e.g., via Testcontainers or Docker Compose) rather than H2 for local development when possible.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=W6ZpB1ckCgQ>

## Questions this post answers

### why doesn't the Spring Debugger plugin in IntelliJ IDEA automatically register a data source for H2 database

By default, Spring Debugger only auto-detects and registers connections for non-in-memory databases such as PostgreSQL and MySQL. H2's default in-memory mode has no persistent connection details for the plugin to detect, so no data source appears in the databases panel out of the box.

_daily.dev surfaces practical IDE workarounds like this for developers fine-tuning their Spring Boot debugging setup._

### how do I make IntelliJ IDEA's Spring Debugger plugin detect an H2 database connection

Switch H2 from in-memory storage to file-system-based storage in the Spring Boot data source properties, then add the auto server=true flag so multiple connections can share the same file-based database. Once configured this way, restarting the application lets Spring Debugger auto-register the H2 connection in the databases panel, just as it does for PostgreSQL or MySQL.

_Developers troubleshooting local database tooling can find setup tips like this one on daily.dev._

## Similar posts on daily.dev

- [Spring Boot Debugging – Now Remote](https://daily.dev/posts/spring-boot-debugging-now-remote-a1g7mxjih) · JetBrains · 18 upvotes · 0 comments
- [Spring Data JDBC Made Easy with IntelliJ IDEA](https://daily.dev/posts/spring-data-jdbc-made-easy-with-intellij-idea-kqz5h1shs) · JetBrains · 0 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#spring-boot](https://daily.dev/tags/spring-boot)

[View this post on daily.dev](https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"IntelliJ IDEA Spring Debugger with H2 Database","url":"https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic"},"datePublished":"2026-09-27T07:26:42.655Z","dateModified":"2026-09-27T07:32:21.873Z","description":"A walkthrough shows how to use the IntelliJ IDEA Spring Debugger plugin, which automatically detects database connection details (like randomly assigned ports...","image":"https://i.ytimg.com/vi/W6ZpB1ckCgQ/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/W6ZpB1ckCgQ/sddefault.jpg","isAccessibleForFree":true,"articleSection":"SivaLabs (YouTube)","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"SivaLabs (YouTube)","logo":"https://media.daily.dev/image/upload/s--8ATVo4an--/f_auto,q_auto/v1790493987/logos/sivalabs-youtube?_a=BAMAMicg0","url":"https://daily.dev/sources/sivalabs-youtube"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"devtools,spring-boot","timeRequired":"PT10M","video":{"@type":"VideoObject","name":"IntelliJ IDEA Spring Debugger with H2 Database","description":"A walkthrough shows how to use the IntelliJ IDEA Spring Debugger plugin, which automatically detects database connection details (like randomly assigned ports...","thumbnailUrl":"https://i.ytimg.com/vi/W6ZpB1ckCgQ/sddefault.jpg","uploadDate":"2026-09-27T07:26:42.655Z","duration":"PT10M","url":"https://api.daily.dev/r/XEmY7WgIC","embedUrl":"https://www.youtube.com/embed/W6ZpB1ckCgQ"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"SivaLabs (YouTube)","item":"https://daily.dev/sources/sivalabs-youtube"},{"@type":"ListItem","position":3,"name":"IntelliJ IDEA Spring Debugger with H2 Database"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/intellij-idea-spring-debugger-with-h2-database-xemy7wgic#faq","mainEntity":[{"@type":"Question","name":"why doesn't the Spring Debugger plugin in IntelliJ IDEA automatically register a data source for H2 database","acceptedAnswer":{"@type":"Answer","text":"By default, Spring Debugger only auto-detects and registers connections for non-in-memory databases such as PostgreSQL and MySQL. H2's default in-memory mode has no persistent connection details for the plugin to detect, so no data source appears in the databases panel out of the box. daily.dev surfaces practical IDE workarounds like this for developers fine-tuning their Spring Boot debugging setup."}},{"@type":"Question","name":"how do I make IntelliJ IDEA's Spring Debugger plugin detect an H2 database connection","acceptedAnswer":{"@type":"Answer","text":"Switch H2 from in-memory storage to file-system-based storage in the Spring Boot data source properties, then add the auto server=true flag so multiple connections can share the same file-based database. Once configured this way, restarting the application lets Spring Debugger auto-register the H2 connection in the databases panel, just as it does for PostgreSQL or MySQL. Developers troubleshooting local database tooling can find setup tips like this one on daily.dev."}}]}
```

