PHP開発をするのに Eclipse (Neon.1a 4.6.1) を入れて PDT (4.1.0) を入れて使い始めようとしたら、
別で9000/tcpを使うツールが起動しなくなってしまった。
9000/tcpはxdebugがデフォルトで使う設定になっていたので、
Preferencesからそのポートを9100に変更し、php側のxdebug.remote_portも揃えて変えて
PHPのデバッグが出来る事は確認したが、相変わらず別なツールの方が起動しない。
netstatを見たところ、javaが9100/tcpと9000/tcpの両方をListenしていた。なんじゃこりゃ。
ツールの方のポートを変える事もできないことはないが、無駄にListenされているのが気持ち悪い。
ホームディレクトリ内のeclipse絡みのファイルを調べたところ、
ようやくこれ絡みのファイルを見つけ、直す事ができた。
直すファイルはこれ。
(workspace)/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.php.debug.core.prefs
eclipse.preferences.version=1
org.eclipse.php.debug.core.xdebugDebuggerSettingsProvider=<settings><proxyEnable>false</proxyEnable>
<clientPort>9000</clientPort> ★★★←本当は一行になっているけどここ★★★
<ownerId>php-server-d6070fba-d4fd-40c2-8c36-5c2435d46eed</ownerId><proxyIdeKey>ECLIPSE_DBGP_xxx</proxyIdeKey><proxyAddress></proxyAddress></settings>
org.eclipse.php.debug.core.xdebug_arrayDepth=3
org.eclipse.php.debug.core.xdebug_capturestderr=1
org.eclipse.php.debug.core.xdebug_capturestdout=1
org.eclipse.php.debug.core.xdebug_children=51
org.eclipse.php.debug.core.xdebug_data=1024
org.eclipse.php.debug.core.xdebug_idekey=
org.eclipse.php.debug.core.xdebug_multisession=true
org.eclipse.php.debug.core.xdebug_port=9100 ★★★←ここは設定ダイアログで変更される★★★
org.eclipse.php.debug.core.xdebug_proxy=
org.eclipse.php.debug.core.xdebug_remotesession=1
org.eclipse.php.debug.core.xdebug_showSuperGlobals=true
org.eclipse.php.debug.core.xdebug_useproxy=false
(以下略)
org.eclipse.php.debug.core.xdebugDebuggerSettingsProvider
の値の<clientPort>
の値を
揃えて9100にしたところ、期待通り9100/tcpだけListenされるようになってくれた。