Hi! It would be really cool if Infisical would hav...
# infisical-feedback
t
Hi! It would be really cool if Infisical would have an IDE plugin (for example for JetBrains) allowing to inject the environment variables to the runtime. The problem with using the Infisical CLI is that when using it the process is Infisical's process (not the one of the application) and the debugger fails to attach to the process. If the debugger doesn't work, you lose very helpful utility in development and the only alternative is generating .env files using Infisical CLI (and from my understanding it's not a good practice to save .env files locally on the machine). Thank you 🙏
âś… 1
v
We recently released Infisical for VS Code!
👍 1
Would that work or are you looking for JetBrains specifically?
t
@Vlad (Infisical) thanks for the response! This is really cool! Does the extension allow injecting secrets into the process, or only browsing secrets (for management)? Also, yeah, we're working with JetBrains, so it would be great if there were a plugin for it.
s
@Tomer Vainer right now the VS Code Extension only supports browsing/managing secrets. Have you tried “attach-mode debugging” for your apps in JetBrains IDE so that the debugger attaches to your app’s port?
Java / Kotlin (JVM):
Copy code
infisical run -- java \
  -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 \
  -jar app.jar

# IDE: create a "Remote JVM Debug" config on port 5005
# suspend=y pauses until debugger attaches
Node.js
Copy code
# Start with debug port open
infisical run -- node --inspect-brk=9229 app.js

# In your IDE: create an "Attach to Node.js" config on port 9229
# --inspect-brk pauses on first line so you don't miss breakpoints
t
Hi @Saif Rahman! Thanks for the response. I'm using .net with rider and actually I tried now creating a .net project run configuration and I configured the exe path to be the location where Infisical is installed (which is not ideal because each team member can potentially install the cli on different location in the file system), and in the arguments I wrote "run — watch —env=dev — dotnet run —no-build" And I've turned on the "attach to child .net processes", and it works! But when I stop my dotnet program using the stop button in the IDE, it doesn't kill the Infisical process (and therefore my dotnet server is continuing to run in the background). Is there some solution to make the JetBrains rider kill the Infisical instance when clicking the stop button? When using regular run mode (without debugging) it does work and stop my dotnet Program.
d
Hi @Tomer Vainer,
dotnet run
itself spawns another child process, so you have Rider, infisical, dotnet run, and your actual app. Since you're already building separately with
--no-build
, can you please try pointing straight at the DLL?
Copy code
run --env=dev -- dotnet bin/Debug/net8.0/YourApp.dll (path might differ slightly based on setup)
Let me know if this works for you!