简体   繁体   English

将 ext-stackdriver_debugger 添加到 composer 以在 Google App Engine 中启用 StackDriver 调试

[英]Adding ext-stackdriver_debugger to composer to enable StackDriver debugging in Google App Engine

I'm following the steps on this page: https://cloud.google.com/debugger/docs/setup/php我正在按照此页面上的步骤操作: https : //cloud.google.com/debugger/docs/setup/php

I want to set up the debugging for App Engine flexible environment (PHP 7.2).我想为 App Engine 柔性环境 (PHP 7.2) 设置调试。

Step 3 says to add the Add the Stackdriver Debugger PHP extension via your composer.json file: with the following command:第 3 步说Add the Stackdriver Debugger PHP extension via your composer.json file:使用以下命令:

composer require ext-stackdriver_debugger:*

However, when I run that, the package cannot be found:但是,当我运行它时,找不到包:

[InvalidArgumentException]                                                                                                                                                   
  Could not find a matching version of package ext-stackdriver_debugger. Check the 
  package spelling, your version constraint and that the package is available in a
  stability which matches your minimum-stability (stable).  

How can I complete Step 3 successfully?如何成功完成第 3 步?

Such error usually means that extension/module is not enabled in PHP version used by composer command.此类错误通常意味着在composer命令使用的 PHP 版本中未启用扩展/模块。 Make sure that you've enabled module in php.ini used by PHP CLI.确保您已在 PHP CLI 使用的php.ini启用模块。 Alternatively you may explicitly use specific PHP version to run composer command:或者,您可以明确使用特定的 PHP 版本来运行composer命令:

/usr/bin/php7.2 composer require ext-stackdriver_debugger:*

In worst case you may try to add extension manually to composer.json :在最坏的情况下,您可以尝试手动将扩展添加到composer.json

"require": {
    "ext-stackdriver_debugger": "*",
    ...
},

and use --ignore-platform-reqs switch on composer update and composer install .并使用--ignore-platform-reqs打开composer updatecomposer install Or just ignore this step - requiring PHP extension does not give you any real benefits except preventing installing package on server without this extension.或者只是忽略这一步 - 需要 PHP 扩展不会给你任何真正的好处,除了阻止在没有这个扩展的服务器上安装包。 You don't need to add PHP extension to composer.json to use it.您无需向composer.json添加 PHP 扩展即可使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Stackdriver vs ELK for app engine - Stackdriver vs ELK for app engine 在App Engine Standard python中使用Google Stackdriver日志时出错 - Error using Google Stackdriver Logging in App Engine Standard python Google Stackdriver使用Redis队列登录App Engine(Python) - Google Stackdriver logging in App Engine (Python) using Redis queue 带有Google App Engine Go 1.11运行时的Stackdriver Trace - Stackdriver Trace with Google App Engine Go 1.11 runtime 未在App Engine Flex(节点)中设置Google Stackdriver日志级别 - Google Stackdriver Log Level not set in App Engine Flex (Node) 谷歌应用引擎。 堆栈驱动程序。 使用 Java 进行日志记录 - Google App Engine. Stackdriver. Logging with Java Google App Engine - 云控制台Stackdriver跟踪详细信息 - Google App Engine - Cloud Console Stackdriver trace details 如何使用 logback 从 google app engine 以 jsonPayload 的形式登录到 stackdriver? - How to log as jsonPayload to stackdriver from google app engine using logback? Google容器引擎记录到Stackdriver错误报告 - Google container engine logging to Stackdriver Error Reporting Google App Engine错误未显示在使用Flask的StackDriver错误报告中 - Google App Engine Errors not showing up in StackDriver Error Reporting using Flask
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM