Setting CookieManager.save.cookies=true does not expose User-Defined Cookies as variables. This is very inconvenient, because the only way to get those values otherwise (for example, if we want to pass them to the backend listener) is to use a JSR223 post-processor from an HTTP sampler (otherwise, the CookieManager is not available) and do one of three suboptimal things: 1. Import o.a.j.p.h.c.Cookie/CookieManager and loop iterate over the cookies by index. (Notably, doesn't work if the cookie value is variable.) 2. Use regular-expression hacks on the output of CookieManager.getCookieHeaderForURL() to extract the value. 3. Import the correct HttpClient CookieHandler and iterate over the list returned from CookieHandler.getCookiesForUrl(). The CookieManager should make the _current value_ of a cookie available at all times when that property is set.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4359