@echo off
setlocal

REM Run emoon-tongue with JDWP debug port 5005 (Windows)
REM Then attach from IntelliJ IDEA using "Remote JVM Debug" (Host: localhost, Port: 5005)

set "ROOT=%~dp0..\.."
set "JAR=%ROOT%\emoon-tongue\target\emoon-tongue-5.4.1.jar"

if not exist "%JAR%" (
  echo [ERROR] Jar not found: "%JAR%"
  echo Please build first:
  echo   mvn -pl emoon-tongue -am clean package -DskipTests
  exit /b 1
)

echo [INFO] Starting (debug 5005): %JAR%
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar "%JAR%" --spring.profiles.active=gssz

endlocal









