原文: https://xdebug.org/docs/upgrade_guide
An upgrade guide detailing which changes there are between Xdebug 2 and 3, and how to reconfigure your set-up to do similar things.
このアップグレードガイドは、Xdebug 2から3への変更点と、同様のことを行うようにセットアップを再構成する方法を詳しく説明します。
Unlike Xdebug 2, where there was an enabling setting for each feature, with Xdebug 3 you put Xdebug into a specific mode, which can be configured with the xdebug.mode setting.
各機能の有効化設定があったXdebug 2とは異なり、Xdebug 3では、Xdebugを特定のモードにします。これは xdebug.mode で設定できます。
This setting, in combination with xdebug.start_with_request is the new way to enable functionality, and to configure when Xdebug's feature activates.
この設定と xdebug.start_with_request を組み合わせる方法が、Xdebugの機能を有効にし、機能をアクティブにするタイミングを設定する新しい方法になります。
The idea behind this is that it is important that Xdebug only has overhead for the features that are actually wanted. For example, it makes no sense have both Profiling and Step Debugging active at the same time.
この背景には、Xdebugが実際に必要な機能のオーバーヘッドのみを持つことが重要であると考えているからです。たとえば、プロファイリングとステップデバッギングの両方を同時にアクティブにすることは意味がありません。
Besides setting the mode with xdebug.mode, you can also set the mode with the XDEBUG_MODE environment variable. If this environment variable is active, it overrides the mode as set through xdebug.mode.
xdebug.mode を使用してモードを設定する以外に、XDEBUG_MODE 環境変数を使用してモードを設定することもできます。この環境変数が有効な場合、xdebug.mode で設定されたモードを上書きします。
To make sure that just Step Debugging is active, instead of:
ステップデバッギングのみがアクティブであるようにするには、次の代わりに:
xdebug.remote_enable=1
xdebug.default_enable=0
xdebug.profiler_enable=0
xdebug.auto_trace=0
xdebug.coverage_enable=0You now only do:
このようにするだけです:
xdebug.mode=debugOr, on the command line:
もしくはコマンドライン上で:
export XDEBUG_MODE=debug
php script-name.phpXdebug's default debugging port has changed from 9000 to 9003.
Xdebugの標準のデバッギングポートは 9000 から 9003 へ変更されました。
Instead of setting the XDEBUG_CONFIG environment variable to idekey=yourname, you must set XDEBUG_SESSION to yourname:
XDEBUG_CONFIG 環境変数に idekey=yourname を設定する代わりに、XDEBUG_SESSION に yourname を設定する必要があります。
export XDEBUG_SESSION=xdebug_is_greatThe xdebug.remote_autostart setting has been removed. Instead, set xdebug.start_with_request to yes.
xdebug.remote_autostart の設定は削除されました。 代わりに xdebug.start_with_request を yes にセットしてください。
In Xdebug 3 calling xdebug_break() will only initiate a debugging session when xdebug.start_with_request is set to trigger.
Xdebug 3では、xdebug_break() を呼び出すと、xdebug.start_with_request が trigger に設定されている場合にのみデバッグセッションを開始します。
It will no longer trigger a debugging session when xdebug.start_upon_error=yes (the replacement for Xdebug 2's xdebug.remote_mode=jit).
xdebug.start_upon_error=yesの場合、デバッグセッションがトリガーされなくなります(Xdebug 2 の xdebug.remote_mode=jit の代替です)。
A debug session will be initiated upon a PHP Notice or Warning, or when a Throwable is thrown, when xdebug.start_upon_error is set to yes, regardless of what the value for xdebug.start_with_request is.
デバッグセッションは、xdebug.start_upon_error が yes に設定されたときは、xdebug.start_with_request の値に関係なく、PHPのNoticeまたはWarning、またはThrowableがスローされたときに開始されます。
This function will no longer initiate a debugging session when xdebug.start_upon_error is set to yes (the replacement for Xdebug 2's xdebug.remote_mode=jit).
この関数は、xdebug.start_upon_error が yesにセットされた場合、デバッグセッションが開始されなくなりました(Xdebug 2 の xdebug.remote_mode=jit の代替です)。
It will still initate a debugging request when xdebug.start_with_request is set to trigger.
これはまだ、xdebug.start_with_request が trigger に設定されている場合は、デバッグ要求を開始します。
Xdebug 3 has removed and changed a lot of configuration settings. This section lists the removed settings and their replacements.
Xdebug 3 では、多くの構成設定を削除および変更しました。このセクションには、削除された設定とその置き換えを一覧で示します。
Use xdebug.mode=trace with xdebug.start_with_request=yes.
xdebug.mode=trace と合わせて xdebug.start_with_request=yes を使用してください。
Has been removed. File names for include() and require() are now always included in Development Aids and Function Trace output.
削除されました。include() と require() のファイル名は、 Development Aids と Function Trace の出力に常に含まれるようになりました。
Has been removed. Arguments are now always visible with variable contents and argument name in Development Aids and Function Trace output.
削除されました。引数は、引数名と変数の内容と合わせて、 Development Aids と Function Trace の出力に常に含まれるようになりました。
Has been removed, it was only used in combination with the xdebug_get_declared_vars() function, which has also been removed.
削除されました。これは、xdebug_get_declared_vars() 関数との組み合わせでのみ使用されていましたが、これも削除されました。
Use xdebug.mode=coverage.
xdebug.mode=coverage を使用してください。
Use xdebug.mode=develop.
xdebug.mode=develop を使用してください。
No replacement. Xdebug turns on this PHP engine setting automatically when needed.
代替はありません。 Xdebugは、必要に応じてこのPHPエンジン設定を自動的にオンにします。
Use xdebug.mode=gcstats.
xdebug.mode=gcstats を使用してください。
Use the generic xdebug.output_dir setting.
一般的な xdebug.output_dir の設定を使用してください。
Has been removed. PHP's var_dump() is now always overloaded through xdebug_var_dump() when xdebug.mode is set to develop. The xdebug_var_dump() function is available independent of which mode is configured.
削除されました。xdebug.mode が develop に設定されている場合、PHPの var_dump() は常に xdebug_var_dump() によって上書きされるようになりました。 xdebug_var_dump() 関数は、構成されているモードに関係なく使用できます。
Use xdebug.mode=profile.
xdebug.mode=profile を使用してください。
Use xdebug.mode=profile with xdebug.start_with_request=trigger.
xdebug.mode=profile と合わせて xdebug.start_with_request=trigger を使用してください。
Use the generic xdebug.trigger_value setting.
一般的な xdebug.trigger_value の設定を使用してください。
Use the generic xdebug.output_dir setting.
一般的な xdebug.output_dir の設定を使用してください。
Replaced by xdebug.client_discovery_header.
xdebug.client_discovery_header に置き換えられました。
Use xdebug.mode=debug with xdebug.start_with_request=yes.
xdebug.mode=debug と合わせて xdebug.start_with_request=yes を使用してください。
Replaced by xdebug.discover_client_host.
xdebug.discover_client_host に置き換えられました。
Use xdebug.mode=debug.
xdebug.mode=debug を使用してください。
No replacement. Xdebug's step debugger only supported the DBGp handler.
代替はありません。 XdebugのステップデバッガーはDBGPハンドラーのみをサポートしています。
Replaced by xdebug.client_host.
xdebug.client_host に置き換えられました。
Replaced by xdebug.log, which also includes log messages beyond Step Debugging.
xdebug.log に置き換えられました。これはステップデバッギング以外のログメッセージも含まれます。
Replaced by xdebug.log_level.
xdebug.log_level に置き換えられました。
For the req value (the original default), use xdebug.mode=debug with xdebug.start_with_request=trigger. If the original xdebug.remote_autostart behaviour is necessary, use xdebug.start_with_request=yes instead of trigger.
req(元のデフォルト)であれば、xdebug.mode=debug と xdebug.start_with_request=trigger を使用します。元の xdebug.remote_autostart の動作が必要な場合は、trigger の代わりに xdebug.start_with_request=yes を使用してください。
For the jit value, use xdebug.mode=debug and xdebug.start_upon_error=yes.
jit であれば、xdebug.mode=debug と xdebug.start_upon_error=yes を使用してください。
Replaced by xdebug.client_port.
xdebug.client_port に置き換えられました。
The default value has also changed from 9000 to 9003.
デフォルト値は、9000 から 9003 に変更されました。
Replaced by xdebug.connect_timeout_ms.
xdebug.connect_timeout_ms に置き換えられました。
Has been removed. The difference in memory usage can be calculated by comparing the usage in the current frame with the previous one.
削除されました。メモリ使用量の差異は、現在のフレームの使用量を前のフレームの使用量と比較することで計算できます。
Use the generic xdebug.output_dir setting.
一般的な xdebug.output_dir の設定を使用してください。
Use xdebug.mode=trace with xdebug.start_with_request=trigger.
xdebug.mode=trace と合わせて xdebug.start_with_request=trigger を使用してください。
Use the generic xdebug.trigger_value setting.
一般的な xdebug.trigger_value の設定を使用してください。
Has been removed.
削除されました。
To prevent Xdebug from showing stack traces, do not configure Xdebug's develop mode in xdebug.mode, or turn off PHP's html_errors INI setting.
Xdebugがスタックトレースを表示しないようにするには、xdebug.mode でXdebugの開発モードを構成しないか、PHPのINI設定の html_errors オフにします。
Has been removed.
削除されました。
To configure Xdebug to showing stack traces, include develop in xdebug.mode.
スタックトレースを表示するようXdebugを構成するには、xdebug.mode に develop を含めます。
Has been removed.
削除されました。
The information that this function returned can be obtained through the xdebug_get_function_stack() function.
この関数が返していた情報は、xdebug_get_function_stack() 関数を介して取得できます。
Has been removed, but was never originally documented or supported.
削除されました。しかし、元々、文書化またはサポートされていませんでした。
The following constants have been changed:
以下の定数が変更されました:
Is now: XDEBUG_PATH_INCLUDE
現在: XDEBUG_PATH_INCLUDE
Is now: XDEBUG_PATH_EXCLUDE
現在: XDEBUG_PATH_EXCLUDE
Is now: XDEBUG_NAMESPACE_WHITELIST
現在: XDEBUG_NAMESPACE_WHITELIST
Is now: XDEBUG_NAMESPACE_BLACKLIST
現在: XDEBUG_NAMESPACE_BLACKLIST