Tomcat for VSCode
Advanced Apache Tomcat management. Full server control, smart deployment, browser integration and debugging support. Features
Installation
Command line:
Usage
When is a project considered a Java EE project? click to expand
Method location, If you notice any false positives/negatives or have better ideas for detection logic, you are more than welcome to contribute:
|
Command | Description |
---|---|
Tomcat: Start |
Launch the Tomcat server |
Tomcat: Stop |
Stop the running server |
Tomcat: Clean |
Clean Tomcat webapps , temp , and work folders |
Tomcat: Deploy |
Deploy the current Java EE project |
Configuration
Access via Ctrl+, → Search "Tomcat"
Setting | Default | Description |
---|---|---|
tomcat.autoDeployBuildType |
Fast |
Default build strategy for deployments (Fast , Maven , Gradle ) |
tomcat.autoDeployMode |
Disable |
Auto-deploy triggers (Disable , On Save , On Shortcut ) |
tomcat.browser |
Google Chrome |
Browser for app launch & debug (Disable , Google Chrome , Microsoft Edge , Firefox , Safari , Brave , Opera ) |
tomcat.port |
8080 |
Tomcat server listen port (valid range: 1024 -65535 ) |
tomcat.protectedWebApps |
["ROOT", "docs", "examples", "manager", "host-manager"] |
List of protected web apps during cleanup operations |
tomcat.logLevel |
INFO |
Minimum log level to display (DEBUG , INFO , SUCCESS , HTTP , APP , WARN , ERROR ) |
tomcat.showTimestamp |
true |
Whether to include timestamps in log messages |
tomcat.autoReloadBrowser |
true |
Whether to automatically reload the browser after deployment. Disable this option if having issues with the browser reloading. |
tomcat.logEncoding |
utf8 |
Encoding for Tomcat logs (utf8 , ascii , utf-8 , utf16le , utf-16le , ucs2 , ucs-2 , base64 , base64url , latin1 , binary , hex ) |
tomcat.home
andtomcat.javaHome
are now auto-detected and hidden from user settings.
Requirements
Runtime:
- JDK 11+
- Apache Tomcat 9+
Build Tools (optional):
Maven
3.6+ orGradle
6.8+ (if usingMaven
orGradle
build types)
Developer Documentation
For technical implementation details and contribution guidelines, see:
Known Issues
Browser Compatibility for Auto-Reload
Some browsers may not support automatic page reloading (click to expand)
The extension uses the Chrome Debug Protocol (CDP) to reload pages after deployment. Currently supported browsers include:
- Google Chrome
- Microsoft Edge
- Brave
- Opera
Unsupported Browsers:
- Firefox
- Safari
These lack CDP support and will not auto-reload.
Debug Mode Launch Failures
Occasional issues launching browsers in debug mode (click to expand)
Even supported browsers might fail to launch in debug mode due to system configurations. The extension uses this command template:
start chrome.exe --remote-debugging-port=9222 http://localhost:8080/app-name
Common solutions:
- Verify browser executable path in system PATH
- Ensure no other instances are using port 9222
- Update browser to latest version
If issues persist, disable
tomcat.autoReloadBrowser
in settings.
What's New in 2.5.3
Real-Time Server Insights
Instant full server logging with dual-stream architecture for all server events (Thanks to @zhuxiaodics6)Granular Log Control
Newtomcat.logLevel
andtomcat.showTimestamp
settings for customized loggingFixed Browser Reload Issue Add fall back to reduce CDP bug damage and
tomcat.autoReloadBrowser
setting to control browser reload behaviorRemoved Unnecessary Futures Removed help command and associated documentation and
tomcat.autoScrollOutput
configuration setting
License: MIT • 💖 Support: Star our GitHub Repo • VScode Marketplace