Development Prompts | Generated by AI
Below are often-used prompts for various development engineer tasks related to the topics you mentioned: Using GitHub Copilot in Visual Studio Code, Debugging Spring Boot Applications in Visual Studio Code, How Locking Works in IBM Db2 Database, Configuring launch.json for Spring Boot in VSCode, and Specifying the JDK for WebSphere Liberty. These prompts follow common patterns such as configuring paths, enabling verbose output, and addressing different aspects of programming like debugging, optimization, and security. They are designed to be versatile and can be adapted to your specific needs.
Using GitHub Copilot in Visual Studio Code
These prompts help you leverage GitHub Copilot for coding, debugging, and understanding tasks in Visual Studio Code (VSCode):
- Code Generation
- “Generate a Python function to calculate the factorial of a number.”
- “Create a React component for a login form with username and password fields.”
- Refactoring
- “Refactor this code to use async/await instead of promises.”
- “Break this large function into smaller, reusable helper functions.”
- Understanding Code
- “Explain what this code does: [paste code snippet].”
- “What is the purpose of this variable in the context of this program?”
- Debugging Assistance
- “Suggest fixes for this error: [paste error message].”
- “How can I add logging to trace the flow of this function?”
Debugging Spring Boot Applications in Visual Studio Code
These prompts focus on setting up and troubleshooting debugging for Spring Boot applications in VSCode:
- Setting Up Debugging
- “How do I set up launch.json to debug a Spring Boot application in VSCode?”
- “Show me how to add a breakpoint in a Spring Boot controller in VSCode.”
- Troubleshooting
- “Why does my Spring Boot app fail to start in debug mode in VSCode?”
- “How do I inspect variable values while debugging a Spring Boot app?”
- Verbose Output
- “How can I enable verbose logging during a Spring Boot debug session?”
- “Show me how to configure detailed stack traces for exceptions in VSCode.”
- Advanced Debugging
- “How do I use conditional breakpoints in VSCode for a Spring Boot app?”
- “What’s the best way to debug a Spring Boot app with multiple threads?”
How Locking Works in IBM Db2 Database
These prompts help you understand and manage locking mechanisms in IBM Db2:
- Understanding Locking
- “What are the different lock types in IBM Db2?”
- “How does Db2 handle locking at the row level versus the table level?”
- Managing Locks
- “How do I check active locks in an IBM Db2 database?”
- “What steps can I take to prevent lock contention in Db2?”
- Troubleshooting
- “How do I identify and resolve a deadlock in IBM Db2?”
- “Why is my Db2 query waiting on a lock, and how do I fix it?”
- Verbose Output
- “How can I enable detailed lock information in Db2 logs?”
- “Show me how to configure Db2 to output lock wait details.”
Configuring launch.json for Spring Boot in VSCode
These prompts assist with setting up and troubleshooting the launch.json
file for debugging Spring Boot applications in VSCode:
- Basic Configuration
- “Provide a basic launch.json example for a Spring Boot app in VSCode.”
- “How do I set the main class in launch.json for a Spring Boot project?”
- Path Configuration
- “How do I configure the JDK path in launch.json for Spring Boot debugging?”
- “Show me how to specify the project path in launch.json.”
- Advanced Configuration
- “How do I add environment variables to launch.json for debugging?”
- “What’s the setup for remote debugging a Spring Boot app in VSCode?”
- Troubleshooting
- “Why does VSCode say ‘Could not find main class’ with my launch.json?”
- “How do I fix a ‘Debugger not attaching’ issue in launch.json?”
Specifying the JDK for WebSphere Liberty
These prompts help configure and troubleshoot the JDK for WebSphere Liberty:
- Path Configuration
- “How do I set the JDK path for WebSphere Liberty in my environment?”
- “Show me how to update WebSphere Liberty to use JDK 11.”
- Troubleshooting
- “Why isn’t WebSphere Liberty detecting my installed JDK?”
- “How do I check which JDK version WebSphere Liberty is using?”
- Verbose Output
- “How can I enable verbose JDK logging in WebSphere Liberty?”
- “What command shows detailed JDK startup info in Liberty?”
- Best Practices
- “Which JDK versions are recommended for WebSphere Liberty?”
- “How do I ensure my app uses the right JDK with Liberty?”
General Programming Prompt Patterns
These prompts cover common patterns across programming tasks, such as configuration, verbose output, and other aspects like optimization and security:
- Path Configuration
- “How do I configure the path for [tool/library] in [environment]?”
- “Show me how to set the classpath for [application/framework].”
- Verbose Output
- “How do I enable verbose logging for [tool/application]?”
- “What’s the way to get detailed output from [command/process]?”
- Debugging
- “Suggest steps to debug this issue: [describe problem].”
- “How can I trace execution flow in [language/framework]?”
- Performance Optimization
- “How do I optimize this code for faster execution?”
- “What are ways to reduce memory usage in [application]?”
- Security
- “How do I secure [application/component] against [vulnerability]?”
- “What are the security best practices for [technology]?”
These prompts are practical, reusable, and tailored to the tasks you’ve specified. You can modify them by adding specific details (e.g., error messages, code snippets, or tool versions) to fit your project’s needs. Whether you’re coding with GitHub Copilot, debugging Spring Boot, managing Db2 locks, configuring VSCode, or setting up WebSphere Liberty, these prompts will help streamline your development workflow.