Classification:code-audit

Classification (code-audit)'s result:

eclipse调试java

本地调试: 双击左键下断点 远程调试: 本地:kali+eclipse 2019 12Eclipse IDE for Enterprise Java Developers. 远程:win7+tomcat7099 catalina.bat jpda start 修改 if not “%JPDA_ADDRESS%” == “” goto gotJpdaAddress set JPDA_ADDRESS=0.0.0.0:8000 如果只是本地那0.0.0.0就是localhost即可,否则会connection refused 注意调试tomcat要配置好src/java /* 不能同时多个连接,如果connection refused就disconnect一个 修改配置的方法 1、Linux中配置tomcat在catalina.sh中添加如下 CATALINA_OPTS=”-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n”(不要换行,要在同一行) 2、Window中修改 catalina,bat文件,添加: Set “CATALINA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n” 或者startup.bat开头加上 Set  “CATALINA_OPTS=-Xdebug  -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n” */ Eclipse 运行tomcat //创建新服务器勾选,选择tomcat目录 运行项目   MISC eclipse切换jdk   切换整个eclipse环境的版本 JDK和JRE要切换一致 Window-> Preferences—>Java—>Compiler Window-> Preferences—>Java—>Installed JREs   切换某个项目的java版本 版本保持一致 项目->Properties->Java Build Path-> Libraries->双击当前JDK->在弹出的界面中选择要切换的版本 项目->Properties-> Java Compiler->右侧面板设置为需要的版本 //项目->Properties-> Project Facets->右侧面板勾上Java,Version设为需要的版本   //Java Build Path中引用的jdk的版本需要和’Project Facets’中配置的java版本一致。 //Run Configurations面板中的JRE配置也需要和’Project Facets’中配置的java版本一致。   导入java自带类库 一些项目提示缺少类,但是java自带,可以直接导入java的jar类库即可  

kali+phpstorm+xdebug+firefox配置本地/远程调试

本地调试: 本地环境:kali(192.168.12.35)+phpstorm2019.1.3+xdebug+firefox 1)安装配置xdebug: 根据phpinfo下载xdebug https://xdebug.org/wizard 1. Download xdebug-2.9.2.tgz 2. Install the pre-requisites for compiling PHP extensions. On your Debian system, install them with: apt-get install php-dev autoconf automake 3. Unpack the downloaded file with tar -xvzf xdebug-2.9.2.tgz 4. Run: cd xdebug-2.9.2 5. Run: phpize (See the FAQ if you don’t have phpize). As part of its output it should show: Configuring for: … Zend Module Api No: xxxxxxxx Zend Extension Api No: xxxxxxxxx If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step. 11.Run: ./configure 12.Run: make 13.Run: cp modules/xdebug.so /usr/lib/php/xxxxxxxx 14.Update /etc/php/7.x/apache2/php.ini and change the line zend_extension = /usr/lib/php/xxxxxxxx/xdebug.so Make sure that zend_extension = /usr/lib/php/xxxxxxxx/xdebug.so is below the line for OPcache. 15.Restart the webserver php.ini: 末尾 [XDebug] zend_extension = /usr/lib/php/xxxxxxxx/xdebug.so   ; Debug Config xdebug.remote_enable = 1 xdebug.remote_handler = “dbgp” xxdebug.remote_mode = “req” xdebug.remote_host = “127.0.0.1” xdebug.remote_port = 9010 xdebug.remote_log = “/var/log/php-fpm/xdebug.log” xdebug.remote_autostart = off   xdebug.idekey = “PHPSTORM”   ; Profiler Config xdebug.profiler_append = 0 xdebug.profiler_enable = 1……

phpstorm+phpstudy+xdebug配置

环境win7+phpstorm2018.3+phpstudy2016+php5.6.27-nts+apache 1. phpstudy开启xdebug扩展   2.修改php.ini: 结尾添加: [XDebug] xdebug.profiler_output_dir=”D:\phpStudy\tmp\xdebug” xdebug.trace_output_dir=”D:\phpStudy\tmp\xdebug” zend_extension=”D:\phpStudy\php\php-5.6.27-nts\ext\php_xdebug.dll”   xdebug.profiler_append = 0 xdebug.profiler_enable = 1 xdebug.profiler_enable_trigger = 0 xdebug.profiler_output_name = “cache.out.%t-%s” xdebug.remote_enable = 1 xdebug.remote_handler = “dbgp” xdebug.remote_mode = “req” xdebug.remote_host = “127.0.0.1” xdebug.remote_port = 9010 xdebug.idekey= PHPSTORM   phpstorm配置与phpstudy同步:    //如果只在phpstudy里面打开项目或者开发就填phpstudy路径就ok    3. 配置xdebug       4. 安装并开启浏览器插件xdebug helper 5. 调试